I contracted for 5-6 years and now back into a permanent job.

Contracting is mercenary work and you have to be really good at what you do. You need a good amount of experiencing before even considering going into contracting. The client expects more from you as well because for them, they are paying the best so expect the best.

In my 5-6 year stint as a contractor (PHP/LAMP side) I realised that I really haven't grown much through that time. Knowledge wise I was pretty much still where I started and there was no chance or time to learn new tech and grow while contracting. My friends in perm jobs had added devops, node, python and related tech to their belts. They were actually creating works of art and using bleeding edge stuff in the perm jobs. The time and money for them to do this was funded by their employers. And they were at much senior roles compared to me (Contract roles at a senior level are difficult to find. I was basically a senior-level code-monkey but always contracted mid-junior dev (Thats what most contracts wanted). No managerial/senior positions.

As for me, I was just miserable waking up to the same shit everyday and it started feeling repetitive. I started feeling like a dinosaur and then, PHP being an entry level language, had a lot of saturation in the market, bringing down the rates significantly.
On top, other devs and departments hate you. For them, you are being paid 3-4 times for the same job they are doing. They would go out for lunch not asking you to join which I didn't mind but it does create a feeling of alienation and I don't like passive aggressive environments.

So, I eventually started burning out and losing interest and got fired from a contract for spending too much time on youtube cat videos (which my employer/client was keeping an eye on for a while.)

This was a blessing in disguise. I had enough savings from the great money I earned contracting. Took a year off, took bootcamps on the latest tech (Python, React, Node, AWS etc). As planned, I started interviewing and accepted a perm job, just to get my foot in, basic pay (mid level) in a Fintech startup (my target field) using everything I had learned. Worked there for 1 year. By the end of 1 year, I had the reigns to most of their projects with one major project being handled by me alone (because of my tough contracting-experience) and I learned a lot furthering my knowledge.

Found a new perm job and got an offer(£85K with plenty of shares). My resignation for them was like a bomb had gone off. They realised that they were paying a senior dev, mid-junior level salary (£50k per annum) and they didn't want to lose me. Was very difficult to leave and make my excuses but got great linkedIn references. Had a great relation with my colleagues and they still think I will come back one day.

Now at the new perm job, working as a senior Engineer/lead (managing a team of 5) in a new fintech, using tech that I love. Everyday is a new day. We have budgets for learning, courses, exams, Friday afternoons are off to allow us to research into any tech we want and we have the freedom to use bleeding edge stuff along with shares in the company. I have colleagues that have made life long friends with.

This is only possible in a perm role. If I was contracting right now, not even in my dreams.

Would I go contracting again? Maybe, for the money and tax savings (Doing taxes was another big pain. Cant rely on accountants 100% and have to keep an eye on what they are doing. They do something wrong, you get jailed. Plus you have to keep track of all expenses to give to the accountant at the end of every month) but not contracting anytime soon. I'm still building myself up for this mercenary work.