Analysis of new characteristics of PHP6

Source: Internet
Author: User
Tags apc php website sapi
This article describes the new features of PHP6. Share to everyone for your reference, as follows:

1. Support for Unicode

Unicode support is inevitable, although Unicode occupies more space, but the convenience of Unicode, far more than the disadvantage of occupying space, especially in the internationalization of today, hardware equipment more and more powerful, speed also greatly improved, so a little shortcomings can be ignored. Another point, PHP can also be set in the. ini file whether to turn on support Unicode, the decision on your own, this is a good idea, turn off Unicode support, PHP performance does not have a significant increase, the main impact is the need to reference a string of functions.

2.Register Globals will be removed

This is an important decision, saying that many new PHP developers will feel that register globals full of convenience, but ignored the register globals will bring the security of the program, most of the host on this feature is closed, Impression from the beginning of the php4.3.x version, this default setting value is closed state, PHP6 formally removed register globals also means that if the program is the product of the PHP3 era, will be completely unusable, in addition to rewriting one way, there is no other method. Believe that the current PHP world, still using the PHP3 era generated by the program should be few.

3.Magic Quotes will disappear

The Magic quotes is primarily auto-escaping characters that need to be escaped, and this feature removes the leaf in line with most
The Voice of PHP developers.

4.Safe Mode Cancel

Frankly speaking, this mode does not know where is not good, cancel it, it is not used anyway

5. ' var ' alias is ' public '

The Var declaration in the class becomes the alias of public, which is believed to be a decision for compatibility with PHP5, and PHP6 can now be called the OO language.

6. Returning by reference will make an error

Now, by referencing the compiler will have an error such as $ A =& new B (), function &c (), OO language default is reference, so no need to use &.

7.zend.ze1 compatbility mode will be removed.

ZEND.ZE1 compatibility mode will be removed, PHP5 is compatible with the old PHP4, so in. ini you can choose whether to turn on compatibility mode, because PHP5 uses the second generation of the parsing engine, but the compatibility mode is not fully able to parse the PHP4 syntax, so the artifacts of the past, removed.

8.Freetype 1 and GD 1 support will not be visible

These two are long libs, so no longer support, GD1 has already been replaced by the GD2 now.

9.DL () is moved to SAPI

DL () is mainly for designers to load extension Libs, which is now moved to SAPI

10.Register Long Array Removal

PHP5 from the default is off, and then PHP6 officially removed.

11. Changes to some extension

For example, XMLReader and XMLWriter will no longer appear in extension way, they will be moved into the core of PHP, and the default is open, Ereg extension will be put into pecl, which means that it will be removed from the PHP core, This is also to give way to the new regular expression extension, in addition, Fileinfo extension will also be imported into the core of PHP.

12.APC will be imported into the core

This is a feature that improves PHP performance and is now placed in the PHP core, with the option to enable APC

13. Say goodbye to ASP-style start tags

The original is to please the ASP developers to the use of PHP, now no longer need this practice, and finally, do not expect PHP6 performance can be fully exceeded PHP5, it is possible that PHP6 execution efficiency will be slower than PHP5, but it can be expected that PHP Development Team will strive to improve the PHP5, beyond the PHP5.

So, friends interested in PHP6 can now download to the official PHP website, try to see if these features have really been reflected in the PHP6

I hope this article is helpful to you in PHP programming.

The above describes the new characteristics of PHP6 analysis, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • Related Article

    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.