Update: The Next Version Of PHP And The Status Of PHPng
Written by Ian Elliot   
Wednesday, 30 July 2014

UPDATED If the current version of PHP is 5.x, what should the next version be called? Obviously it should be 6.x. Why then is there a proposal that it should be 7.x? And as PHPng gets ever faster, is it PHP 5.7, PHP 6.0 PHP 7.0 or even PHP 8.0?

Update 30th July 2014

After suspending the vote for reasons that aren't clear it was started again and ended on the 30th July. The result was 58 to 24 in favour ot the next version of PHP being called PHP 7. 

"the next major release of PHP, to succeed the 5.x series, shall be named PHP 7."

http://news.php.net/php.internals/76254

 

phplogo

 

PHP is a language that sort of just grew. It had success forced upon it and moved from being a simple scripting language designed to build web pages programatically into a very general server side web language.

The problem with languages that grow in the disorganized way that PHP has, is that they tend to be messy and generally inefficient. If you think about it this way, then it is amazing how good a language PHP actually is. 

There are, however, many things that could do with improving and PHP programmers are starting to contemplate the next version. As the current version is 5.x, it might seem obvious that the next version should be 6.0. But there is a problem. A while ago work on a version 6.0 was started and its major task was to change the core operation to support Unicode. This proved a tough challenge and version 6, well that particular version 6, was abandoned and most of the improvements were rolled up into the 5.x line. Note that PHP still doesn't support Unicode and work on making it do so was abandoned. 

You can now see why the next, next version might not be called 6.0. There were quite a lot of books produced in the expectation that version 6.0 would be available and when it wasn't most PHP 6.0 books ended up covering PHP 5. Calling the next version of PHP version 6.0 risks confusing people. Thus there is merit in thinking about calling it version 7.0

There is currently an RFC vote going on at the PHP Wiki to decide if the next version should be called 6.0 or 7.0. The vote closes on the 27th of July and the verdict will be based on a simple majority. At the moment the vote is for PHP 7.0, but there is a week to go.

Another confusing factor in the "next PHP" story is that the is already a next PHP that isn't in the main development branch and it is called PHPng, where "ng" stands for "Next Generation". Some of the developers of PHPng are calling it PHP 6.0 (they probably mean PHP 7.0) and while other developers are suggesting that it should really be called PHP 5.7, or even that it isn't ready for the main branch at all. 

The whole matter has been made a focal point by recent benchmarks that suggest that PHPng, which was initiated back in January, is nearly twice as fast as PHP 5.6. PHPng . The benchmark consists of rendering the front page of a standard WordPress installation. No other changes were made other than upgrading PHP 5.6 to PHPng and it is claimed that all the major extensions are working with the alpha language. 

If you are wondering where the speed improvements have come from the answer is that it is just a better implementation of the existing core algorithms. For example, changing the way variables are stored and accessed. 

To quote Dmitry Stogov, the main moving force behind the project:

"It was clear the VM is already highly optimized, but works with data structures that require endless memory allocation, deallocation and reference counting. Typical real-life PHP application spends about 20% of the CPU time in memory manager, 10% doing hash tables operations, 30% in internal functions and only 30% in VM."

Some of the changes in the way things were implemented do make a difference to the semantics of the language but these are relatively small - it no longer preserves the original parameter values for use with func_get_arg instead the current value is returned and you can't have functions with duplicated parameter names, which sounds like something you shouldn't have been able to do in the first place. 

Having a drop in replacement for PHP that requires no changes and doubles performance would essentially upgrade many of the worlds web servers without changing the hardware.

So is PHPng version 5.7, 6.0, 7.0 or even 8.0, or perhaps none of the above?

The good news is that PHPng is a step on the way to a full JIT implementation of PHP which would likely be even faster, so even PHP programmers have something to look forward to. 

phplogo

 

Banner


The Feds Want Us To Move On From C/C++
13/11/2024

The clamour for safe programming languages seems to be growing and becoming official. We have known for a while that C and C++ are dangerous languages so why has it become such an issue now and is it  [ ... ]



Ursina - A Game Engine Powered by Python
08/11/2024

Ursina is a new open source game engine in which you can code any type of game in Python, be it 2-D, 3-D, an application, a visualization, you name it.


More News

 

espbook

 

Comments




or email your comment to: comments@i-programmer.info

 

Last Updated ( Wednesday, 30 July 2014 )