|
This article describes the new features of PHP6. Share it with you for your reference, the details are as follows: 1. Support Unicode
Although Unicode takes up more space, the convenience brought by Unicode far exceeds the shortcomings of taking up space, especially in today's internationalization, hardware equipment is becoming more and more powerful, and the network speed has also been greatly improved, such a small shortcoming can be ignored. Another point, PHP can also set whether to enable Unicode support in the .ini file, the decision is up to you, this is a good idea, turn off Unicode support, PHP performance will not be greatly improved, the main impact is the function that needs to reference the string. 2. Register Globals will be removed This is an important decision, saying that many new PHP developers will find Register Globals very convenient, but ignore that Register Globals will bring hidden dangers to the security of the program, most hosts on this function is turned off, the impression is that from the beginning of PHP version 4.3.x, the default setting value of this item is off, PHP6 officially removed Register Globals also means that if a program is a product of the PHP3 era, it will be completely unusable, and there is no other way to do it than rewrite it. I believe that in the current PHP world, there should be very few programs produced in the PHP3 era that still use it. 3. Magic Quotes will disappear Magic Quotes is mainly used to automatically escape characters that need to be escaped, and this function removes most of the leaves that conform to the rules Count the voices of PHP developers. 4. Safe Mode canceled To be honest, I don't know what's wrong with this model, just cancel it, and I can't use it anyway 5. 'var' alias 'public' The var declaration in the class becomes an alias for public, which is believed to be a decision made to be compatible with PHP5, which can now also be called an OO language. 6. Returning by reference will give an error Now returning the compiler by reference will give an error such as $a =& new b(), function &c(), OO language defaults to reference, so there is no need to use & anymore. 7.zend.ze1 compatbility mode will be removed Zend.ze1 compatibility mode will be removed, PHP5 is compatible with the old PHP4, so you can choose whether to turn on the compatibility mode in the .ini, because PHP5 uses the second-generation parsing engine, but the compatibility mode is not 100% able to parse PHP4 syntax, so it is a product of the old era, removed. 8. Freetype 1 and GD 1 support will be missing These two are long-standing Libs, so they are no longer supported, and GD1 has long been replaced by the current GD2. 9. dl() was moved to SAPI dl() mainly lets the designer load extension Libs, which is now moved into SAPI 10.Register Long Array removal It is closed by default from PHP5 onwards, and then officially removed in PHP6. 11. Some Extension Changes For example, XMLReader and XMLWriter will no longer appear as extensions, they will be moved into the PHP kernel, and by default, the ereg extension will be put into the PECL, which means it will be moved out of the PHP core, which is also to make way for the new regular expression extension, and the Fileinfo extension will also be imported into the PHP kernel. 12. APC will be imported into the core This is a feature that improves PHP performance, and now it will be put into the PHP core with the option to enable APC or not 13. Say goodbye to ASP-style starting tags It was originally to please ASP developers to switch to PHP, but now this practice is no longer needed, finally, don't expect the performance of PHP6 to exceed PHP5 in an all-round way, it is possible that the execution efficiency of PHP6 will be slower than PHP5, but it can be expected that the PHP development team will work hard to improve PHP5 and surpass PHP5. So, friends who are interested in PHP6 can now download it from the official PHP website to see if these features are really reflected in PHP6 I hope this article will be helpful to everyone's PHP programming.
|