Get ready for PHP 7; it's going to be fast.
In fact, 100-percent-plus performance improvements have been seen in version 7, Rasmus Lerdorf, the founder of the scripting language, said at the O'Reilly Fluent conference in San Francisco. Lerdorf further noted that this performance gain has been experienced in most "real-world" full-stack applications.
Based on the phpng branch of the language, version 7 is due as a first release candidate in June, and the final production version is expected in October. The phpng branch has been focused on such issues as how the language works with data structures, data types, and memory allocation.
The new version features engine improvements, lower memory usage, and native local thread storage. In fact, PHP 7's reduced need for servers makes it the environmentally sound choice, Lerdorf stressed. "Just in terms of being green, PHP 7 should pretty much be an essential upgrade for anybody who is running a lot of servers."
Version 7 is based on an abstract syntax tree, which should be worthwhile for anyone building add-on tools or conducting static analysis or profiling, Lerdorf said. Return types in PHP 7 feature a syntax to, for example, specify that a function returns an array. Strict types are offered as well. "Basically, strict types, if you turn them on, are super, super strict. It has to be the correct type," Lerdorf said.
Lerdorf also warned that the upgrade also deprecates some PHP 4 functions: "Chances are pretty good if your code is from 12 years ago, it will probably break under PHP 7. If it works under PHP 5, you should be fine."
This story, "Coming soon: PHP 7 -- and it's a scorcher" was originally published by InfoWorld.