PHP5.6 and PHP7.0 differences

Source: Internet
Author: User

1. PHP7.0 has a twice-fold performance improvement over PHP5.6.

The 2.php7.0 fully and uniformly supports 64-bit.

The fatal error that occurred before 3.php7.0 was changed to throw an exception.

4. Added the empty UNION operator (?? )。 The effect is equivalent to the ternary operator.

5.php7.0 adds a new return type declaration for the function.

6.php7.0 added a scalar type declaration.

The formal parameter type declaration of a function in PHP 7 can be a scalar. In PHP 5, only the class name, interface, array, or callable (PHP 5.4, which can be functions, including anonymous functions), can now use string, int, float, and bool.

7. New anonymous classes are added.

PHP 5.3 begins with an anonymous function, and now adds an anonymous class;

8.php7.0 after the overflow removed some old SAPI (server-side application programming ports) and extensions that were no longer supported.

9.define You can now define a constant array.

The difference between the two is only my personal view of the information and documentation after the written, there is a wrong hope that everyone correct, there is a need to learn more about the Official Handbook: http://php.net/manual/en/migration70.new-features.php.

PHP5.6 and PHP7.0 differences

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.