A couple of days past the PHP Development Team have introduced the new version PHP 5.6. It offers some nice new options and enhancements, whereas different options are removed or marked as deprecated.PHP 5.6 is maybe the smoothest from all the recent releases.This cover version comes with new options, some backward incompatible changes and plenty of enhancements. PHP 5.6.0 additionally introduces changes that have an effect on compatibility.
The main of Features in PHP 5.6 include:
1.Constant Scalar Expressions:
With the release of PHP 5.6, it's attainable to produce a scalar expression which incorporates each numeric and string literals. In previous versions of PHP, it had been expected to be a static value of constant function arguments and property declaration.
2.Variadic Functions via "...":
Earlier we were using func_get_args() to get all the arguments avilable in a function call, however with PHP five.6, this will be removed as we will simply get that facility with the ... operator.
3.Argument Unpacking:
We can use the same operator (...) to unpack any argument which is either an array or a set of Traversable objects.
4.** Shorthand:
The ** operator has been added for exponentiation. we've support for the shorthand operator as simply.Note that the order of operations comes into play victimisation this operator.
5.phpdbg:
An interactive debugger referred to as phpdbg has been further in PHP 5.6.
This phpdbg program is enforced as a SAPI module.
6.__debugInfo():
A new magic methodology side in PHP 5.6 allows you to change the properties and values of an object when the object is output using var_dump().
7.Default Character Encoding:
The default character for the htmlentities(), html_entity_decode() and htmlspecialchars() functions will be set exploitation default_charset().
8.Large File Upload:
File uploads larger than 2 GB in size are now accepted..
9.php://input is reusable:
php://input can be used as many times you want to read data. This feature offers a great reduction in memory compared to reading POST data.
10.use function and use const:
The use operator has been offered to support the extending of constants and functions. this will be performed by victimisation the const and the use functions, severally. Earlier this operator was restricted to class only.
11.Deprecated Features:
#Call From Incompatible Context:
When you conceive to access a non-static method statically, or a static method using object context, it'll immediately generate the E_DEPRECATED error.
#$HTTP_RAW_POST_DATA:
$HTTP_RAW_POST_DATA is deprecated now. We should be using php://input instead.
#Encoding Setting:
With the launch of the default_charset() configuration, the related option is deprecated for iconv and mbstring.
PHP 5.6.0 also introduces some changes affecting compatibility.
1.Array keys won't be overwritten when defining an array as a property of a class via an array literal.
2.json_decode() is more strict in JSON syntax parsing.
3.Stream wrappers now verify peer certificates and host names by default when using SSL/TLS.
4.GMP resources are now objects.
5.Mcrypt functions now require valid keys and IVs.
This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at http://ift.tt/jcXqJW.
No comments:
Post a Comment