Overview | News | Windows | macOS | Android | iOS | Audio Formats | Components | Encoder Pack | Screenshots | Help & Support | Developer | Old Versions | Other Projects | Blog & Rants
PHP rant published on 2026-10-28
<<previous permalink next>>
advertisement
If you write a computer program, in any sensible programming language, without bugs that would break it, it generally still works after 10 or 20 or even 30 years.
In case of C++, new revisions of the standard usually take code written for prior standard without problems, at worst you get an informative-enough compilation error, rather than different behavior at runtime.
But wait, you can just tell newer C++ compiler to use old version of the standard, then programs not compatible with recent changes in the standard can be compiled correctly.
Enter PHP.
I wrote my first batch of PHP about 20 years ago. I used whole lot of mysql_*() calls, which didn't seem like a bad idea at the time.
Eventually the servers had to be upgaded to PHP 7. To avoid refactoring of large amounts of very old code, I simply wrote a drop-in replacement wrapper for legacy mysql functions. It did seem odd to me that PHP just dropped these instead of including such wrapper by default.
Fast forward to 2026, all the servers had to be upgraded to PHP 8, breaking various old code again.
Some functions used by legacy code have simply disappeared, mainly affecting forum script plugins.
Some things behave differently than they did before, in particular some SQL methods that returned null on error now throw exceptions.
Being an interpreted rather than compiled language, each of these is a runtime behavior change rather than something you'll find statically before even running your code, so you have to run code and look for stuff that broke (unless your codebase is small enough for manual review, or you trust AI to do this for you).
This is simply bad.
Why can't PHP remove functionality less often, so hotfixing 2 or 3 branches covers 99.99% of users?
Why can't PHP have a switch to emulate specific old version, like, PHP equivalent of -std=<version> ?
I can understand removal of early-version features that were simply bad, but there's a sensible time window for this. Removal of 'each' style enumeration in PHP 8 is an example how not to do this - if it worked for 20 years, keep it.
Annoyingly I can't replace PHP with another language. I simply have too much PHP code, some of which I'd like to think is pretty good.
I also avoid adding more programming languages to the list of stuff I must maintain - and I can't possibly get rid of PHP at this point.
So PHP stays. I seriously hope it doesn't end with compromised server and trojaned downloads.
Or maybe it's time to consider going back to old fashioned static HTML eh.
In case of C++, new revisions of the standard usually take code written for prior standard without problems, at worst you get an informative-enough compilation error, rather than different behavior at runtime.
But wait, you can just tell newer C++ compiler to use old version of the standard, then programs not compatible with recent changes in the standard can be compiled correctly.
Enter PHP.
I wrote my first batch of PHP about 20 years ago. I used whole lot of mysql_*() calls, which didn't seem like a bad idea at the time.
Eventually the servers had to be upgaded to PHP 7. To avoid refactoring of large amounts of very old code, I simply wrote a drop-in replacement wrapper for legacy mysql functions. It did seem odd to me that PHP just dropped these instead of including such wrapper by default.
Fast forward to 2026, all the servers had to be upgraded to PHP 8, breaking various old code again.
Some functions used by legacy code have simply disappeared, mainly affecting forum script plugins.
Some things behave differently than they did before, in particular some SQL methods that returned null on error now throw exceptions.
Being an interpreted rather than compiled language, each of these is a runtime behavior change rather than something you'll find statically before even running your code, so you have to run code and look for stuff that broke (unless your codebase is small enough for manual review, or you trust AI to do this for you).
This is simply bad.
Why can't PHP remove functionality less often, so hotfixing 2 or 3 branches covers 99.99% of users?
Why can't PHP have a switch to emulate specific old version, like, PHP equivalent of -std=<version> ?
I can understand removal of early-version features that were simply bad, but there's a sensible time window for this. Removal of 'each' style enumeration in PHP 8 is an example how not to do this - if it worked for 20 years, keep it.
Annoyingly I can't replace PHP with another language. I simply have too much PHP code, some of which I'd like to think is pretty good.
I also avoid adding more programming languages to the list of stuff I must maintain - and I can't possibly get rid of PHP at this point.
So PHP stays. I seriously hope it doesn't end with compromised server and trojaned downloads.
Or maybe it's time to consider going back to old fashioned static HTML eh.
advertisement