PHP 7.2 has released officially with new features, functions and several smaller core improvements. PHP 7.2 has come with some new security functions and language legacy clean ups. it provides a big performance boost and it is faster than PHP 7. Here I will describe about the new released features that are mentions as below.
PHP 7.2 features
- Parameter type widening
- Abstract class Parameter type widening
- Trailing comma in list syntax
- Object Type Hinting
- New Sodium extension
- Argon2 in password hash
As we known, PHP 7 introduced a big performance improvement compared with PHP 5. The benchmarks reported an average improvement of 2x for the execution time and a great reduction of the memory consumption 10x in some cases.
This performance boost took PHP to be one of the fast interpreted language in the world.
PHP 7.2 introduces again some performance improvement. According to the benchmark published by Michael Larabel, PHP 7.2 is 20% faster than 7.0 and 10% faster than 7.1
PHP 7.2 introduces the usage of the object type. This new scalar type can be used to represent PHP objects.