How to choose the PHP version

Source: Internet
Author: User
Tags new features

More than 75% of Web sites use PHP as a development language, and the popularity of wordpress,phpmyadmin and other Open-source projects has led to a slew of long tail users. However, they are typically installed but rarely upgraded. The following figure is the current usage statistics for PHP.

Amazingly, the left half of the graph represents a PHP version that has not been supported. PHP 5.2 was no longer maintained as early as January 2011. This doesn't mean you can't use it, but that means some security updates and you can't follow up. Some distributions will try to fix some bugs, but your PHP version seems a bit lackluster because you're using outdated technology from 2006.

Where do I start?

No one has chosen PHP version 5.2, but these things have happened, but I'm not saying that I'm writing this blog to spit out anything, let alone give you some guidance on how to upgrade. Typically they are using some 2006 of the starting host space, they have a "long term support" version to avoid using newer versions, or they have no plans to upgrade yet. Or, there are really a lot of reasons. However, good things are waiting for you in the new version of PHP.

PHP 5.3 Adds a lot of useful OOP features! For example: Anonymous functions, SPL extensions are not just iterators, and fabulous datetime extensions are already integrated into PHP 5.3. Also adds the extremely important e_deprecated error reporting flag. It will remind you of the features you are using and will not be available for the next version. If you are already using PHP 5.3, your upgrade path will be smoother. If you have a wired program running in a lower version, I do not recommend that you upgrade.

PHP 5.4 Performs a series of optimizations that have faster execution efficiencies and less memory footprint. The following are the results of the benchmark test.

Whether you use the traits feature, PHP 5.4 improves program performance and lowers hardware costs. So, I recommend that you keep upgrading when you use open source software.

PHP 5.5 is still being tested and does not apply to production environments. Since PHP 5.3, the risks and changes to the upgrade will be greatly reduced.

Future

To tell the truth, the future belongs to those who use PHP5.4 and above. Maintaining upgrades and regularly tracking the new features and progress of the language is part of our daily work. If you are already behind, then I strongly recommend that you start your upgrade plan and upgrade to a newer version. The effort is worthwhile, after all, the program is running for ages.

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.