PHP 6 preview-new features and Improvements

Source: Internet
Author: User
Tags pear representational state transfer
PHP's next version, V6, contains many new features and syntax improvements, making it easier to use in the object-oriented aspect. Other important features include Unicode (Unified encoding) support in core functions, which means Php 6 provides better and more reliable international support. PHP has become popular and used by countless websites. It is supported by most Internet access providers and used by large network companies such as Yahoo. In the coming PHP version, we are going to add some new features of success to make PHP easier to use and safer in some scenarios. Are you ready to accept Php 6? If you upgrade your program tomorrow, will your program run well? What should you do? This article integrates Php 6 changes, some of which are backed up and transplanted to the PHP v5.x version. Your current script may need to be adjusted. If you are not using PHP now, but you are always thinking about it, consider its new features. These features, From Unicode core support to XML support, make it easier for you to write functions to fill PHP applications. PHP 6 new features Php 6 is currently used as a developer snapshot, so you can download and try this article to list many features that have been implemented in the current snapshot. Improved Unicode support many improvements to Unicode String Support in PHP's core functions, these new features will have a huge impact because they allow PHP to provide more support for international characters. So if a developer or architect uses a different language, such as a Java programming language, because it has more international support than PHP, it will take a little time to consider PHP when it supports improvement. Because today you can download to the developer version of PHP V6, and you will see that some function functions support Unicode strings. A function list has been tested and verified to be fully capable of Unicode processing. For more information, see resource. A namespace is a method that prevents your functions, classes, and methods from being read due to name conflicts between functions or classes, rather than Prefix naming conventions. Therefore, by using a namespace, you can name a class name that someone else may already use, without worrying about errors during running. The following provides an example of using a namespace in PHP. You do not need to update or change the source code, because any PHP code you write can run well without a namespace. Because the namespace feature seems to be ported to PhP 5.3 x, if it can be used, you can reference the namespace in your own program. Namespace example <? PHP
// I'm not sure why I wocould implement my own xmlwriter, but at least
// The name of this one won't collide with the one built in to PhP
Namespace nathanagood;
Class xmlwriter
{
// Implementation here...
} $ Writer = new nathanagood: xmlwriter ();?> The Web 2.0 feature depends on how you use PHP and your current script. The current language and syntax differences may or will not affect the following features to the greatest extent, this refers to the PHP applications that directly allow you to reference web 2.0 features. Soap is a network service "speaking" protocol and supports many other languages, such as Java and Microsoft. net, although there are other methods to drive and use network services, such as the representational state transfer rest, soap is still the most common in making different platforms operable. In addition, soap is used in PHP extensions and pear libraries. Soap is not supported by default in PHP, so you can enable this extension or ask your ISP to enable it. In addition, the pear package allows you to create soap clients and servers, such as soap packages. If you change the default settings, soap will be enabled in PHP 6. This extension will provide you with easy implementation of soap clients and soap services, allowing applications you write to provide use or network services. If SOAP extensions are set by default, it means you cannot set them in PHP. If the PHP applications you develop and they are published to an ISP Server, you may need to check your ISP to verify soap and enable upgrade for them. XML in PHP 5.1 xmlreader and xmlwriter have become part of the PHP core, which makes it easier for you to use XML in your PHP program. Like soap extensions, if you use soap or XML, this is good news, because Php 6 is more suitable for you than the already released PhP4. In addition to some new features, the PHP 6 engine will delete some features that are already available in previous versions. Most of these features, such as register_globals and safe_mode, are regarded as "broken" in current PHP ". Because they may expose some security risks. In the effort to clear PHP, these will be deleted or discarded from PhP in the next version. Opponents think that most ISPs or enterprises will keep their current scripts because upgrading to PhP6 will destroy the current scripts, But supporters think they are very happy to see the PHP team fix these vulnerabilities and provide a clean, A secure running tool. Functions to be deleted from PHP Include: magic_quotes
Register_globals
Register_long_arrays
Safe_mode

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.