Looking forward to PHP 8

I still remember my first day at my first programming job in Spring 2000. A senior colleague has handed me a book on PHP 3 and said, "Read this, and here's your first project". The project was some maintenance work on an existing PHP 3 code base.

Fun times.

PHP's got so much bad rap back then, I was hesitant to admit I was a "PHP programmer". I moved on as fast as I could, despite it being a language very friendly to beginners such as myself.

When I returned to technical work in mid-2010s after a prolonged sojourn into adjacent disciplines (requirements engineering, project management), I used PHP for some client work. This time, it was PHP 5, and it already felt very, very different. It had type hints, namespaces, the frameworks such as Laravel used modern design patterns such as DI, unit testing was mature and encouraged.

Still, the stigma carried on.

Nowadays, I'm happy with .NET and Node.js and will think twice before considering another stack, since these two can do pretty much anything on the web (and beyond). As a curious programmer, though, I do take an occasional foray into a foreign territory, or visit tech I used long ago to see how it changed.

PHP 8 might very well be one of my near-future nostalgia trips.

I was originally caught by a blog post on performance, which seems to be just amazing. Not sure how much the new JIT is responsible for it, and how much it will affect normal, I/O-bound code, but for certain applications, it's going to make a difference.

A list of upcoming features impresses me as well. Union types, anyone?

I'm not sure how the long-held argument about PHP deployment being easier than the alternatives (say, Node.js or Python) still rings true. My client projects that run on Laravel have the standard php-fpm + nginx setup, and that's no easier than my tango blog that uses a Node.js process also proxied by nginx.

That said, once you edit php.ini, enable the standard extensions you need, and set up the php-fpm process, everything else "just works". The web-centric nature of PHP means you aren't as likely to go hunting for 3rd party code (as in, npm install xyz --save) because the functionality is already bundled with PHP.

And when you do need something extra, Composer has you covered.

If there's one area where I am still not at all happy with PHP, it's the tooling.

In Visual Studio Code, the development experience isn't comparable to that for Javascript / Node. "Go to definition", "Refactor / rename" is nowhere as fluid.

In Webstorm, as much as I tried to create "IDE helpers" for my Laravel project, there were squigglies everywhere. Half the time I wanted to refactor something, I had to do it by hand. The dynamic, type-free nature of PHP intervened.

I don't know how PHP 8 can address that. I do know I am going to give it a try once it's out - when the right project comes along.