PHP5.3.0

Source: Internet
Author: User
For PHP5.3.0 in June 30, PHP.net released the Release Version 5.3.0.
I have never had time to pay attention to it. today, I have taken a special look and added many meaningful new features, such as the namespace support.
I thought it would be implemented in PHP6, but I didn't expect 5.3.0 to be added. Before PHP6, 5.3.0 was indeed a relatively noteworthy version.
A simple list of more noteworthy features, for all the update logs can refer to ChangeLog (http://www.php.net/ChangeLog-5.php#5.3.0)
In addition, the PHP team provides a topic to guide how to migrate 5.2.x projects to 5.3.0, see http://www.php.net/migration53
Since there is no linux environment, you can only analyze it under win. You are welcome to take a look.

1. change mysql extension to mysqlnd.
Mysqlnd is a MySql driver designed for PHP6. it adopts the PHP open source protocol to avoid copyright disputes and is placed inside php. After careful comparison, we will find that the libmysql. dll file is missing in windows 5.3.0. it is precisely because the mysqlnd driver is used that the libmysql. dll external driver does not need to exist. Using the mysqlnd driver will not change the usage of mysql or mysqli, and will improve some performance.

2. removed the ISAPI extension
To use PHP 5.3.0 in IIS, you cannot add the. php extension to php5isapi. dll in IIS as before. Therefore, in IIS, only CGI and Fast-CGI are available in PHP 5.3.0. Who else will use the old CGI, so we can only use Fast-CGI.

Because only the vista environment is available, the following describes how to use PHP 5.3.0 in IIS7.

1) enable the CGI function of IIS

Choose Control Panel> Program> Windows function, choose Internet information service> World Wide Web Service> Application Development function> CGI (check this box to enable CGI and FastCgi functions at the same time)

2) added support for PHP 5.3.0

Open the IIS Manager and select the server (applied to all websites) or a website (applied to a single website ). Select the handler ing option to list all program mappings. Select Add module ING on the right. Enter *. php in the path (if you want to process other extensions, add them one by one), select FastCgiModule for the module, and select php-cgi.exe under PHP 5.3.0as the executable file. Name customization. if you need more settings, click request restrictions.

3) set php. ini

Put php. ini in the PHP 5.3.0 folder. the setting method is no different from that before. However, you must set date. timezone = Asia/Shanghai. Otherwise, an error will be reported during running. OK, then you can see phpinfo (). you just need to open the extension on your own.

3. namespace support
Added namespace support in PHP 5.3.0. PHP programmers have always been very proud, because they have many powerful open-source projects (Drupal, Wordpress, and so on), but mentioned namespaces have to be helpless. Now, the PHP team finally moved the namespace originally conceived in PHP6 to PHP 5.3.0. Using namespaces in PHP also uses the namespace keyword.

4. static latency binding
Added support for static latency binding in PHP 5.3.0. Added functions such as the static keyword and get_called_class () to access specific members in the inheritance tree.

5. closure
Added support for closures in PHP 5.3.0 to facilitate the use of anonymous functions or Lambda expressions. You can put a function in a variable. This is what I expect most.

6. garbage collection mechanism
An optional garbage collection mechanism is added to PHP 5.3.0. As an optional feature, it seems that the PHP team is not very eye-catching on this feature. After all, for the Web, after the page is executed, all the resources are released, and there is no need to specifically process the resource recycling. Better than nothing.

7. optimized a large number of functions and fixed a large number of bugs.
According to PHP. NET, over 140 bugs have been fixed. Added an extension. In addition, the performance of many known functions is optimized. for example, the md5 () speed increases by more than 10%. For all updates, see ChangeLog (http://www.php.net/ChangeLog-5.php#5.3.0)

5.3.0 provides a large number of new features and greatly optimizes the overall performance. The overall performance is improved by about 10%. So, if possible, upgrade the project to 5.3.0.

Refer:

ChangeLog

Migrating from PHP 5.2.x to PHP 5.3.x

What does php 5.3 bring?

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.