* Namespaces, closures and FPM were already in PHP 5.3
* The built-in web server was already in PHP 5.4
* Improved variadic functions, argument unpacking and phpdbg will be in PHP 5.6, which goes to beta in about a week.
"The new Java"
It's good to see PHP maturing. However sometimes the most important features of a language are the features you don't add. I think PHP would do itself a big favor by cleaning up its main APIs and standard library first. Maybe they will do that in PHP 6, since I doubt they want to break APIs in minor releases.
However that doesn't work forever, at some point you need to clean up some of the old stuff. That's why a PHP 6 release is planned in the near future (i.e. somewhere in the next three years ^^).
Yes, the PHP core api is still a bit messy due to backward compatibility, but everything else it pretty awesome really. Please take a closer look if you haven't touched PHP in years, before you talk it down.
PHP starts as a fucking mess and gets worse. Maybe once the developers figure out what it is I'll take a look but yeah it's pretty much the developers taking standard features from other languages and fucking them up just like they did yesteryear.
Closures with a use block... even in C you don't have to do that... it's a joke and a mess... How is it that a 44 year old language has better features and less cruft than one 15 years old?
Does it have a ==== operator yet?
Usage of server-side programming languages for websites: http://w3techs.com/technologies/overview/programming_languag...
Recently, however, I had to get in there. This was a few days after I upgraded my local environment from 5.3 to 5.5. I've been writing Ruby for fun for a while now, and I love how I almost never have to look API related questions up, at least in comparison to PHP API questions. So I just wrote some PHP without looking up whether it was going to work, and it worked, first try. That rarely happens. Then I pushed it to dev, which is still on 5.3, and took the (dev) site down. Turns out the feature "array function dereferencing" is not available in 5.3, so I had to rewrite my code a little bit.
Point being, I could see myself liking PHP more when we move to 5.5 in all our environments.
I'm a Drupal dev at my day job, application dev at home. I love getting into my codebase for my sidejob, but D7 is awful under the hood. PHP isn't what makes it messy, it's the procedural hook system.
And yes, PHP 5.5+ is awesome to have.
Modern PHP is not the PHP of yesteryear. With Composer for dependancy management and sticking to the PSR's you can build very stable, testable, and modern applications that change minds about PHP.
PHP users need to keep it together and set a common base, a standard library with sane defaults.
Things like object type hinting can help building stable apps but imho it is still the work of the programmer that can break or make it.
I haven't finished the article yet, but really? Is that what PHP needs? A built-in web server? It strikes me that adding more tools that incompetent web developers can abuse is what got them there in the first place.
How long until we start having security releases for the PHP web server, because so many clueless devs decided to launch and run their site with it?
> It strikes me that adding more tools that incompetent web developers can abuse is what got them there in the first place.
This is profoundly ridiculous. It's the equivalent of saying Home Depot shouldn't sell power tools because some do-it-yourselfer might saw his foot off.
Just because a tool can be misused is not an argument against it nor its inclusion.
Regardless of what anybody thinks about Ruby developers, I've never heard or seen that "people launching production sites with servers intended mainly for Rails development use" is/was a widespread thing.
* Make the "stdout == response body" an explicit option, and make a rendering engine the default instead. Just sending all output is a senseless DEFAULT.
* Remove all the array_x functions and turn arrays into a class instead, and change the parameter order to be consistent across all the functions. A similar action could be done across many other classes of functions, too.
* Tighten equivalence requirements, == should work like ===.
* Etc.
But I always realize I'd just end up with Ruby or Python, both of which already exist and have fantastic ecosystems. Oh well.
Being a PHP developer myself, I can't refute that only selling point of PHP, albeit, a major one, is its so "easy" to get things done. I feel in the near future, with advent of tools to make mature frameworks more accessible, PHP would cease to be a tool for any serious web development.
PHP is a mature webdevelopment language that features an easy to learn, read, and develop feature set. Scala or Perl are not. (See Perl 6) So I don't see how emulating it will provide any form of benefit. Picking up a language feature because a guru attacks PHP because they can write a feature X in Y lines is almost an immature.
The reusability and performance issues were genuine, but these were to be expected given version iterations and the fact PHP introduced namespaces a while back.
I don't mean a Ruby or another vastly different language.
I mean a language similar in approach to PHP, but with the gotcha's removed, some order and consistency introduced into the API, and a few changes to the defaults. Open source, free, and on all major OS's.
These people will be the death of all of us.
[0] https://www.sellvana.com/blog/on-composer-psr-and-namespaces
The new libs'n'tools are nice; good to see them showcased. But the bottom line for any developer should be to avoid it --like Perl-- for any from-scratch code. This is a legacy language now.
Given that it doesn't have one, python beats it easily.
Regarding Zend Engine, does anyone have a link for just how much 'less'?
Because it suits and is made by that niche, copy-pasted "solutions" and monkey-ing others, just as the latest versions of PHP try to monkey other language and framework thinking, shows a profound character of its community, monkey-patches thrown together to look like some thought was put into it.
It is not the language of the future, its not where inventions happen.
Its still the same old to its core, pieces cobbled together to look like something it isnt, trying to hide the inconsistencies in its core.
Which is really kind of the problem with PHP. All of that broken stuff was allowed to be broken for so long that it's effectively impossible to fix it. All you can do is layer on more features.