What's new in PHP 7.2

What's new in PHP 7.2

What's new in PHP 7.2

The latest version 7.2 of the server-side web development language is the second PHP 7 update since it was released in December 2015. It has many fixes, better security, and new code management features.

This second update of PHP 7 greatly enhances the performance of previous versions, including through several improvements in security. Thus, the Argon2 algorithm, which is used for secure password hashing, corrects the defects of the current algorithms and this also allows a higher filling rate of the memory. PHP 7.2 now integrates into its kernel the Libsodium cryptography library, used for authenticated encryption,  and the library's performance for cryptography on elliptic curves has been improved.

Other updates include the Secure Sockets Layer / Transport Layer Security (SSL / TLS) constants, which also have been improved. Another important change is the removal of the Mcrypt encryption library. Other new features except the security updates include the conversion of numeric keys into object / array distributions, which solves a problem with the Zend Engine running PHP 7. In some situations, table hashes could contain numeric strings, while hash tables objects could contain whole keys, which prevented the PHP code from retrieving keys. The fix provided by PHP 7.2 converts the hash table keys and object hash tables into the correct formats, so that custom numeric format strings are translated into integer keys, solving the problem of inaccessibility .

Explicit object typing or "hint type" fixes a situation in which a developer can not declare a function that is supposed to receive an object as a parameter or declare that a function must return an object. The fix uses the object as the parameter type and return type. HashContext as an object, migrates the hash extension to use an object extension for hash contexts instead of using resources. 

A new warning was added when calling the count () function with a scalar parameter, a null parameter, or an object that does not implement the Countable interface.

You can download PHP 7.2 by visiting the Downloads section of the php.net site (php.net/downloads.php)