About PHP 5.3.0

Source: Internet
Author: User
Tags what php
June 30, Php.net released the release version of version 5.3.0.
Have no time to pay attention to, today special to look at, added a lot of meaningful new features: such as the desirable namespace support.
Originally thought this will be realized in the PHP6, did not expect 5.3.0 to increase. Before PHP6, 5.3.0 was a more noteworthy version.
Simply list the more notable features, and refer to ChangeLog (http://www.php.net/ChangeLog-5.php#5.3.0) for full changelog.
In addition, the PHP team provided a topic to guide how to migrate 5.2.x projects to 5.3.0, see http://www.php.net/migration53
Because there is no Linux environment, so only in win under analysis, welcome to shoot bricks.

1. Change the MySQL extension to Mysqlnd
MYSQLND is a driver designed for PHP6 by MySQL, which uses the PHP open source protocol to avoid copyright disputes and put it inside PHP. Careful comparison will find that 5.3.0 's version of Windows Libmysql.dll This file, it is because of the use of MYSQLND driver, so libmysql.dll this external driver is not necessary to exist. Using the MYSQLND driver does not change the way you use MySQL or mysqli, and it improves performance.

2. Remove the ISAPI extension
To use PHP 5.3.0 in IIS, there is no way to add the. php extension to Php5isapi.dll as before. So the way to use PHP 5.3.0 on IIS is only the CGI and fast-cgi two choices. Now who else will use the old-fashioned CGI, so can only use fast-cgi.

Due to the vista environment at hand, the following will be used under introduction IIS7 PHP 5.3.0

1) Turn on the CGI feature of IIS

Open Control Panel-programs-turn Windows features on or off, open Internet Information Services-World Wide Web services-application development features-cgi (Selecting this box will open both CGI and fastcgi features)

2) Add PHP 5.3.0 support

Open IIS Manager, select a server (apply to all sites), or a Web site (apply to a single site). Select the handler mapping option, and all program mappings will be listed. Select Add module mappings on the right. Then the path is filled in as *.php (if you want to work with other extensions, add them sequentially), the module chooses Fastcgimodule, and the executable file selects Php-cgi.exe under PHP 5.3.0. Name Custom, if you need more settings, click Request Restrictions.

3) Set PHP.ini

PHP.ini placed in the PHP 5.3.0 folder can be set up in the same way as before. However, to set date.timezone = Asia/shanghai, the runtime will error. OK, then you can see the phpinfo (), what needs to expand, self-open on the line.

3. Namespace support
Namespace support has finally been added to PHP 5.3.0. PHP programmers have always been very arrogant, because they have a lot of powerful open source projects (Drupal, WordPress, etc.), but the mention of the namespace has to be helpless. Now the PHP team has finally advanced the namespace originally conceived in PHP6 to PHP 5.3.0. Using Namespaces in PHP also uses the namespace keyword.

4. Static delay Binding
Added support for static delay bindings in PHP 5.3.0. Added several functions, such as the Static keyword and get_called_class (), to implement access to specific members of the inheritance tree.

5. Closed Package
The addition of support for closures in PHP 5.3.0 makes it easy to use anonymous functions or lambda expressions. You can put the function in a variable. This is the most expected function for the author.

6. Garbage collection mechanism
An optional garbage collection mechanism has been added to PHP 5.3.0. As an optional feature, the PHP team seems to have little to do with this feature. After all, for the web, after the page has been executed, all the resources have been released, and there is no need to deliberately dispose of the resource collection. Better than nothing it.

7, optimized a large number of functions, fixed a large number of bugs
According to Php.net, more than 140 bugs have been fixed. Added if an extension. In addition, the performance of many known functions is optimized, such as MD5 () speed increased by more than 10%. For all updates, refer to ChangeLog (http://www.php.net/ChangeLog-5.php#5.3.0)

5.3.0 This version provides a lot of new features, and the overall performance has been greatly optimized, the overall performance of the increase reached about 10%. So, if possible, upgrade your project to 5.3.0.

Reference:

ChangeLog

Migrating from PHP 5.2.x to PHP 5.3.x

What PHP 5.3 brings

  • 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.