Differences between PhP5 and PhP6

Source: Internet
Author: User
Tags apc sapi

1. Unicode supported
Unicode is supported. Although Unicode occupies a large amount of space
Convenience, far more than the disadvantages of space occupation, especially in the international today, the more hardware equipment
The more powerful the network speed, the smaller the disadvantages can be ignored. In addition
One point, PHP can also set whether Unicode support is enabled in the. ini file. You can decide whether to enable Unicode,
This is a good idea. Turning off Unicode support does not significantly improve PHP performance.
The major impact of the upgrade is the function that needs to reference strings.

2. Register globals will be removed
This is an important decision. Many new PHP developers will think that register globals is full.
It is convenient, but it ignores the fact that register globals will bringProgramHigh Security Risks
This feature is disabled on most hosts. It is the default option when php4.3.x is used.
The setting value is disabled, and the formal removal of register globals from PhP6 also indicates that if the program
It is a product of the php3 era and will be completely unusable. There is no other way to rewrite it. Phase
Believe in the current PHP world, there should be few programs still produced in the php3 era.

3. Magic quotes will disappear
Magic quotes is mainly used to automatically escape characters that need to be escaped. This function removes the leaf that meets the requirements of most
The voice of PHP developers.

4. Safe Mode canceled
Honestly, I don't know where this mode is. Cancel it and I won't be able to use it anyway.

5. the alias 'var' is 'public'
The VaR declaration in the class is changed to the public alias, which is determined to be compatible with PhP5,
PhP6 can also be called OO language now.

6. errors will be returned through reference
Now the compiler returns an error through reference, for example, $ A = & New B (), Function
& C (),
The OO language is referenced by default, so you do not need to use it again.

7. Zend. ze1 compatbility mode will be removed from Zend. ze1 compatible mode
PhP5 is compatible with the old PhP4, so you can choose whether
The compatibility mode is enabled because PhP5 uses the second generation of parsing engine, but the compatibility mode is not
Hundreds of times can parse the PhP4 syntax, so the product of the old age is removed.

8. FreeType 1 and GD 1 support will be missing
These two are libs for a long time, so they are no longer supported. gd1 has already been replaced by GD2.

9. DL () is moved to SAPI
DL () mainly enables designers to LOAD extension libs and is now moved to SAPI

10. Remove register long array
It is disabled by default from PhP5, and then removed in PhP6.

11. Some extension changes
For example, xmlreader and xmlwriter will no longer appear in extension mode and will be moved
To the core of PHP, and is enabled by default, ereg extension will be put into PECL, representing that it will
Removed from the PHP core, which is to give way to the new regular expression extension,
In addition, fileinfo extension will be imported into the PHP core.

12. APC will be imported to the core
This is a function to improve PHP performance. Now it will be put into the PHP core and you can choose whether to enable APC.

13. Farewell to the starting label of ASP Style
It turned out to be an attempt to make ASP developers turn to PhP. This practice is no longer needed today,

Finally, do not expect the performance of PhP6 to fully exceed PhP5. It is possible that the execution efficiency of PhP6 will be higher
PhP5 is still slow, but it is expected that the php development team will work hard to improve PhP5 and
PhP5.

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.