⬆️ ⬇️

PHP 5.6.0 alpha1

The PHP development team has announced the start of the PHP 5.6.0 release cycle.



Some innovations:







Scalar expressions in constants


const THREE = TWO + 1; const ONE_THIRD = ONE / self::THREE; const SENTENCE = 'The value of '.THREE.' is 3'; 




Variable number of function arguments


 function f($req, $opt = null, ...$params) { // $params is an array containing the remaining arguments. printf('$req: %d; $opt: %d; number of params: %d'."\n", $req, $opt, count($params)); } 


')

The use statement now supports variables and functions.


 use const Name\Space\FOO; use function Name\Space\f; 




The next alpha release is scheduled for February 6th.



download page

List of changes

binary files for windows

Source: https://habr.com/ru/post/210206/



All Articles