PHP is a language I dislike, but am good at. It is a language that, as long as you stay away from certain parts of it, you’ll be safe and it works well. It can even be beautiful in some rare instances.
The very hackish nature of PHP does allow for rapid development, but it’s eclectic design makes it a minefield for anybody who isn’t personally motivated and regimented about clean, safe and sensible coding.
The new improvements in 5.3 only continue the junk-shop eccentricity of the language. Great when you know you want these things and how to use them, a pain if it’s all new to you.
PHP can claim to be “Object Orientated” until the cows come home, but the fact of the matter is PHP’s native objects and commands are still painfully procedural, trapped in a stasis field of backwards-compatibility.
Whilst a new high-speed fixed array is nice, the project is trying to solve it’s problems by bundling a library rather than entering this stuff into the core syntax. I honestly don’t want to use a bolted-on library and to have to instantiate classes for something I would much rather be able to do properly inline with the native syntax
array (...). Having to use a library makes for syntaxically unpretty and elongated code, the spawning of more and more one-shot classes and variables until your code starts looking like VB6 meta-programming.
PHP currently can create lambda functions via
create_function, but this accepts the function code only as a string, meaning that it’s not practical for anything more than one or two lines of code as you have to escape the string. Text editors can’t syntax highlight this or provide any additional interactivity with this horrible function-text-blob.
Closures change everything. Now it is possible to write
Closures alone is going to make a massive difference to the way I code PHP. It’s going to allow for much tighter code across the board. Developers will be able to use a lot less ancillary and pseudo-private functions polluting the global namespace.