PHP programmers should be able to use the five tools _php tutorial

Source: Internet
Author: User

After working on several large PHP projects and writing a lot of PHP code, I found many tools to improve code quality and simplify publishing, making it a lot easier for PHP developers. Many of these tools may already be used by everyone. However, since some people do not even notice the existence of these tools, I will start from here, OK, no nonsense, here is what I think all PHP programmers should know the list of tools. Phing-a project building system

Phing is an Apache ANT-based project building system. Its name is an acronym for a clumsy statement-phing is not a GNU make. Phing can do anything traditional build systems like GNU make can do without a steep learning curve.

The idea behind Phing (and other building systems) is to evaluate a range of dependencies and then execute a series of PHP classes to properly install and configure an application system. The build process is controlled with a simple XML configuration file. Out of the box, the phing built-in can perform a series of substitutions (such as changing the include path between your development version and product version), executing SQL statements, moving and copying files, running external scripts, and so on. You can also create your own custom tasks by extending the "task" class that is included in the release package.

For anyone who needs to deploy a large PHP application on more than one server in the afterlife, Phing is an invaluable asset. At the same time I found it useful for simple PHP scripts as well.

Xdebug-Debugging and analysis tools

Xdebug is a php extension that helps you debug and analyze scripts. The most useful feature in Xdebug is the new note, warning, and error messages that are displayed after activation. If a script does not work correctly, Xdebug will output a full heap trace of the error message, with the function name, parameter value, source file, and line number. This is a welcome feature for programmers who are tired of the poor error reporting functionality that PHP defaults to.

This extension has many more advanced features that allow developers to perform code coverage analysis, collect analysis information, and interactively debug scripts. Profiling functionality features are particularly useful. The parser uses a common output file format that allows you to quickly discover bottlenecks in your code using tools like Kcachegrind. For any serious developer, a good parser is the basic tool that allows you to properly optimize your code while avoiding the hazards of premature optimization.

PHPUnit-Unit Test framework

PHPUnit is a lightweight PHP testing framework. It is a full transplant of the JUnit 3.8.1 under PHP5, a member of the Xunit Test framework family (they are based on the design of the software model pioneer Kent Beck).

Unit testing is the foundation of several modern agile development approaches, making phpunit a key tool for many large PHP projects. This tool can also be used by the Xdebug extension discussed earlier to generate code coverage reports, and can be integrated with phing for automated testing.

Propel-orm (Object Relational Mapping) framework

Propel is a PHP5 object-relational Mapping (ORM) framework, which originates from the Apache torque project. It provides a complex but easy-to-use database abstraction layer that allows you to use database entities like normal classes and objects in PHP. Propel allows you to define your database using a simple XML format that is used to map the database and generate static classes used in the application.

Propel is embedded in the popular Symfony PHP framework (and others), which makes the code more flexible, modular, and portable. This project has excellent documentation from the program and a great support community.

Phpmyadmin/phppgadmin-web-based database management system

History is a bit long but still useful, phpMyAdmin is one of the most useful management tools for any database (corresponding to PostgreSQL and SQLite are Phppgadmin and phpsqliteadmin). It helps to do everything-from creating and deleting databases to making backups in order to debug the app. Installing it is usually the first thing I do after installing Apache, PHP, and MySQL on a lamp server. If you're using MySQL and somehow haven't heard about it, install it now.

Other tools

http://www.bkjia.com/PHPjc/531689.html www.bkjia.com true http://www.bkjia.com/PHPjc/531689.html techarticle after working on several large PHP projects and writing a lot of PHP code, I found a lot of tools to improve the quality of the code and simplify the release, making it a lot easier to make a career as a PHP developer ...

  • Related Article

    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.