Table of Contents
PHP 5.6 have lots of new improvements but also marked some functions as deprecated ,Let's discuss below Backward Incompatible .
Backward Incompatible
json_decode
json_decode() function now removes all non-lowercase variants of json literals ex: true, false, and null.GMP Resources
If you are checking resource explicit using is_resource() then you have to modify your otherwise no need to modify anything.Mcrypt
Some Mcrypt function like mcrypt_encrypt(), mcrypt_decrypt(), mcrypt_cbc(), mcrypt_cfb(), mcrypt_ecb(), mcrypt_generic(), and mcrypt_ofb() now will not accept keys if size is incorrect .Array Values and Overwriting
Previously in it'sversion array value use to overwritten when the explicit key was the same as sequential implicit key. let's consider below example
What's new in PHP 5.6
Constant Scalar Expressions
Now it's possible to have scalar expression that holds both numeric and string literals.
Argument Unpacking
get arguments of array or a set of Traversable objects.
** shorthand
now it's easy in 5.5 to declare exponentiation as shorthand ,let's check below