PHP 6. Coming soon…
Probably you have already heard about that fact that the group of developers of the PHP 6 met in November 2005 in Paris. In that meeting they discussed the PHP development. Before starting the article about the innovations I want to say that everything that will be mentioned here is not the completed decisions and they can be changed in the PHP 6 release. But still we can talk about perspectives.
Unicode
At that moment the Unicode support can be implemented only on the «per request» level, i.e. for every requested file. It means that PHP will have to save all variants of the classes, methods and functions names in the Unicode and non-Unicode symbol table that will increase the amount of the consumed resources.
Developers decided to create the Unicode setting on the whole server layer, not request. Disabling the Unicode support can increase the efficiency of the string functions up to 300 % and applications up to 25%.
Register Globals will disappear
Say good bye to that setting because it will be finally removed. php.ini also won’t include that option, and if you include it yourself you’ll get the E_CORE_ERROR. It means that PHP 6 will finish the epoch of the PHP 3 scripts. It is very serious but necessary step.
Magic Quotes will be excluded
That option will be removed too. In the case of enabling that option you will get E_CORE_ERROR. It will affect the magic_quotes, magic_quotes_sybase and magic_quotes_gpc.
Safe Mode will be removed
Those who hosts on the servers that require Enabled Safe Mode will probably like that innovation. Now enabling of that option will cause the E_CORE_ERROR..
'var' will become the alias of the ‘public’
Var is used in the PHP 4 classes. In the PHP 5 object method var using causes the E_STRICT error. Error warning will be removed in the PHP 6 and var will become the alias of the public.
Compatibility with zend.ze1 will be removed
Ze1 supported the old behavior of PHP 4 but didn’t work by 100%, that’s why it will be removed in the sixth version.
Freetype 1 and GD 1 support will be removed
The support of these old libraries will be removed
dl() will remain only in the SAPI
Every SAPI function will be registered separately and only CLI and embed SAPI will be working since that moment.
FastCGI will be enabled by default
FastCGI will be enabled by default for CGI SAPI and there will no any opportunity to disable FastCGI support.
Old names of the global arrays will be removed
Do you remember old arrays such as HTTP_*_VARS? If you don’t use $_GET and $POST, our advise is “Start using them” because they will cause the E_CORE_ERROR in PHP 6.
Add-ins to the PHP engine
There will be added new data type to the engine - int64. it will be used for integer by default.
ifsetor()
It seems that we won’t see that function. In the ?: operator we’ll be able to omit one parameter. We’ll write as follows: "$foo = $_GET['foo'] ?: 42;" (i.e. if foo is true, $foo equals 42).
foreach for multilayer arrays
It is an excellent innovation. You can pass through several layers of the array, for example "foreach( $a as $k => list($a, $b))".
Static bond
There will be added new keyword for accessing the next bond - static::static2(). It will allow to handle the static during executing.



