AzaStudios Concocting new videos and code

Category Archives: Php

Any content which has something to do with PHP.

Unstable Castle of PHP

A metaphorical way of describing PHP’s situation is a castle on the edge of a cliff which is similar to a castle which I saw in a recent Let’s Play series that I saw on YouTube the other week and you may be thinking that this is very true or that it’s a load of crap.

Whichever side that you belong to, the content in this post may be of relevance to you as I’ll be going over a number of things in recent times that has caused concern about PHP’s future with some being points which you may have heard before from other people.

One point of concern which many may or may not agree with is the rapid obsession towards OOP (Object Oriented Programming) which can be highly useful when you take into account class and objects being introduced as it helps to modularise the code however, more recent additions like traits really raises the question to where they are going as traits are generally next to useless as they don’t really add any extra value except, to those who just want to use it for the sake of using it.

One example is the planned action of disallowing get_class($this); within objects while allowing it in traits which is essentially, them removing a feature in order to try to force people to use traits which is a generally useless feature as described above and so, a lot of overhead is added to scripts written in PHP for the sake of catering to the PHP Team’s whims with get_class($this); being useful for using methods as callbacks like in a regex as opposed to resorting to other measures like lambdas (which adds complexity with where it’s stored) or functions (which defeats the object of modularisation along with not being able to control access to it).

Another action which was relatively pointless which is bound to have widespread repercussions was deprecating the original MySQL extension with it being removed in a later version which raises the question of why they didn’t just add more features to it as opposed to just entering permanent maintenance mode with it as that would fix the issue of breaking every single piece of code in existence that relies on it and it would provide additional value in the form of new features which PHP developers can take advantage of.

The biggest indicator of how PHP isn’t doing well in recent times is PHP5.4 which has had shockingly slow adoption rates with PHP5.2 remaining on the map for so long despite it being sent away into end of life status a very long time ago which is generally due to PHP breaking many features while not quite convincing people that it’s worth upgrading to newer versions of PHP which is a general indicator of public opinion.

While a new version of PHP may be useful due to speed improvements, this is offset by overhead from new features such as traits and it still doesn’t compensate the huge lengths of time to update due to all of the countless backwards compatibility breaks which happen despite it not even being a major release like PHP6 where you might reasonably expect large backwards compatibility breaks.

With their newest version of PHP known as PHP 5.5, they have tried adding new features such as generators which may be useful in some situations and the new password API however, the password API would have been a lot more relevant a decade ago when it actually would have been quite useful as most developers already have their own password implementations done with those who don’t finding it a relatively easy task so, it’s not exactly the ground changing addition which some may hope it to be.

This one is a bit of a frequent topic whenever someone discusses PHP however, it’s one of the things which has really held it back and that is PHP6 where they originally planned to have Unicode support in order to enter a whole new era however, there were many problems during development like performance hits for instance and it getting split between those who wanted to continue along 5.x and those who wanted to continue 6.x with PHP6 simply getting cancelled forever which is generally due to the approach being where all existing strings are stored as Unicode strings as opposed to giving the option to store ones that people actually need as Unicode strings as Unicode strings like some other programming languages do.

Skip to toolbar