What is the difference between php7 and php5

PHP7 away from the official release, and there is quite a long time, known as the business for several times faster than the old version, various open source frameworks or systems to run on PHP7 speed efficiency several times. So what is the difference between the php7 and php5 that? Below this article come to tell you a brief introduction, you want to help.

 

php7 difference and distinction between the php5:

1, performance: PHP7 promoted twice PHP5.0 performance.

2, a comprehensive and coherent 64-bit support.

3, many previous fatal error, now replaced by throwing an exception.

4, PHP 7.0 removed some old is not supported by the SAPI than PHP5.0 (server-side application programming interface) and extensions.

5, PHP 7.0 than PHP5.0 new empty engagement operator.

6, PHP 7.0 adds a new binding than the PHP5.0 comparison operators.

7, PHP 7.0 adds return than the PHP5.0 new type declaration of the function.

8, PHP 7.0 adds more than PHP5.0 new scalar type declaration.

9, PHP 7.0 increase than the PHP5.0 new anonymous class.

Why PHP7 increase over the PHP5 performance?

1, the variable byte storage is reduced, reduce the memory footprint, the variable operation speed to enhance

2, to improve the structure of the array, the array elements and hash mapping table is allocated in the same piece of memory, reduced memory footprint, improved cpu cache hit rate

3, improve the function call mechanism, by optimizing the link parameter passing, reducing the number of instructions to improve the efficiency

Guess you like

Origin www.cnblogs.com/FLy-1992/p/11647839.html