Four ways to make PHP coding easier _php Tutorial

Source: Internet
Author: User
Tags hhvm javascript extension php framework

Four ways to make PHP coding easier


Bkjia Featured Translations "Although the PHP language has already established its own software culture, it is not difficult to find its maddening drawbacks." We have listed in previous articles The 12 worst features that the language is most difficult for developers to accept.

But over the past few years, PHP has undergone a series of changes-from the language itself to the relevant ecosystem to the support of the developer community-that really deserves our attention. Although users who have abandoned PHP and are committed to Python or Ruby are less likely to be drawn back in a short time, there are already signs that there is a real effort to improve PHP. Let's take a look at the four notable improvements in the PHP language.

1. Package and Dependency Management

Until recently, the only way to manage the PHP package was to use pear, the PHP extension and the application library. But Pear has long been criticized by developers for their ease of use, which is flooded with outdated and non-maintainable software components. Most of the more popular PHP frameworks have their own unique package management systems-such as CakePHP's Bakery, CodeIgniter's Sparks, and so on-but they have little or little to do with PHP as a whole.

The biggest change in this area stems from composer, which draws on the excellent elements of node. JS's NPM system and Ruby's bundler. It tracks packages on a project basis, which makes it easier for developers to figure out which packages are needed for a particular project and install them in an automated manner. It works in conjunction with a library called Packagist, which already contains a large number of commonly used PHP applications, frameworks, and components.

2. HACK/HHVM

The other two most notable changes that PHP obtains are derived from the PHP system itself-more precisely, from the Facebook:hack language and HHVM, the hiphop virtual machine. The former inherits the mantle of PHP while adding a series of features that the PHP default state cannot implement, such as static object types. The latter is able to compile PHP code into C + + code to speed up its execution, resulting in nearly 10 times times the original performance level. Both are relatively short-time innovations, so their impact on PHP in the long run is still to be seen. But at least they show that the mainstream Web services giants do show a strong interest in PHP and take it seriously, and as such, they are the platform they choose.

3. Php-fig

Although it sounds like a small snack of a diversion fig, it is actually a PHP framework program that summarizes the technical results that PHP developers have built to build development standards, including how to develop their own projects in a consistent manner. Technical staff from cakephp, Drupal, Joomla, and SugarCRM have formally joined the group and have provided a standardized mechanism for a number of daily tasks-including coding style guides, library login interfaces, and how to handle automatic loading of classes.

This group can be said to be fully voluntary and not a formal body, but they hope that "over time, the scope of coverage can be extended to a wider range of project zoning." ”

4. Phpng Project

The development of the replacement version for the PHP language ontology is another excellent way to bring the language into full improvement. This PHP development branch, known as Phpng, contains a number of improvements designed to identify how much memory capacity is required for a particular operation and how many machine instructions are required to complete a particular run. Most of the work is sponsored by PHP vendor Zend Technology, which is widely used in commercial installations of the language.

Of course, most of these improvements are simply to improve their performance rather than to change the ironic grammatical features of the PHP language-Unfortunately, these problems are still not being resolved. Perhaps the next major overhaul of PHP will not be as disruptive as hack, but more like a JavaScript extension that enables native compilation to be translated.

English: http://www.infoworld.com/t/php-web/4-ways-php-coding-getting-less-painful-245435

http://www.bkjia.com/PHPjc/834693.html www.bkjia.com true http://www.bkjia.com/PHPjc/834693.html techarticle four ways to make PHP coding easier Bkjia featured translations "Although the PHP language has already built its own software culture, it is absolutely essential to find its maddening drawbacks ...

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