PHP Performance Optimization Preparation article illustration pear Install _php instance

Source: Internet
Author: User
Tags benchmark pear

What is Pear

Pear is an abbreviation of the PHP extension and the application library (the PHP Extension and application Repository). It is a PHP extension and application of a code warehouse, simply, pear is the PHP cpan.

Why to install Pear

Pear offers a rich php extension tool class that is easy to use and can be used in a variety of projects. Benchmark is a pear expansion pack that provides timer, iterate, and Profiler three tool classes that can be used for breakpoint debugging during performance tuning to get code execution time.

How to install Pear

Open source installation of the PHP root directory, such as C:\Program files\php5\php-5.2.6\, double-click Go-pear.bat file, illustrated installation process as follows

In this way, pear installed successfully, the installation process is basically only to press the ENTER key can be very simple.

How to install the benchmark class

Visit: Benchmark

(1) DOS command installation Benchmark tool class
Enter the following command
>pear Install Benchmark-1.2.7

such as: C:\Program files\php5\php-5.2.6>pear install Benchmark-1.2.7
Direct access to the PEAR directory after successful installation, such as C:\Program files\php5\php-5.2.6\pear

(2) Direct Download benchmark Tool class file

Download Address: Http://

Direct download decompression exists under PEAR directory, such as C:\Program files\php5\php-5.2.6\pear

Only the pear installation is discussed here, and the benchmark toolkit is used to discuss how to download and install the tool class package using pear. The next issue will discuss how to use the Benchmark tool class breakpoint debugging to get the execution time of the code and the average time that the function executes.

Other Notes

What is CPAN?
CPAN is a huge Perl expansion module warehouse, the written application module can be placed under the appropriate classification directory below CPAN, other people can easily reuse, of course, you write the application module also need to follow the guidelines

reference materials

Pear Introduction: Write your next PHP program with Pear

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