New Features in PHP 5.6
Constant Scalar Expressions
With the release of PHP 5.6, it is possible to provide a scalar expression which includes both numeric and string literals. In previous versions of PHP, it was expected to be static value of constant, function arguments and property declaration.
Earlier we were using func_get_args() to get all arguments available in function call, but with PHP 5.6, this can be removed as we can easily get that facility with … operator.
We can use the same operator (…) to unpack any argument which is either an array or a set of traversable objects.
** operator has been added for exponentiation, we have got support for the shorthand operator as easily.
An interactive debugger called phpdbg has been added in PHP 5.6. Please visit the official document for phpdbg.
Default Character Encoding
Default character set for htmlentities(), html_entity_decode() and htmlspecialchars()functions can be set using default_charset()
Large File Upload
It is possible to upload file larger than 2GB.
php://input is reusable
php://input can be used as many times you want to read data. This feature has great reduction in memory compare to reading POST data.
use function and use const
use operator has been offered to support extending of constants and functions, this can be performed by using the const and the use functions, respectively. Earlier this operator was limited to class only.