PHP performance Optimization preparation schematic pear installation _php Tutorial

Source: Internet
Author: User
Tags benchmark pear
What is Pear

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

Why to install pear

Pear offers a wide range of PHP extension tools that are easy to use and can be used in various projects. Benchmark is an expansion pack for pear that provides timer, iterate, and Profiler three tool classes that can be used for breakpoint debugging during performance tuning to get the execution time of the code.

How to install pear

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










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

How to install the benchmark class

Access: http://pear.php.net/Search 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) Download benchmark tool files directly

Download Address: Http://pear.php.net/package/Benchmark/download
Benchmark:http://download.pear.php.net/package/benchmark-1.2.7.tgz

Direct download decompression exists under the 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 as an example to discuss how to use the pear to download and install the tool pack. 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 the function executes.

Other Instructions

What is CPAN?
CPAN is a huge Perl extension Module warehouse, the application module can be placed under the CPAN under the appropriate directory, other people can be easily reused, of course, you need to write the application module also adhere to the guidelines

References

PEAR http://pear.php.net/
Pear Introduction: Use Pear to write your next PHP program

http://www.bkjia.com/PHPjc/324697.html www.bkjia.com true http://www.bkjia.com/PHPjc/324697.html techarticle What is pear pear is an abbreviation for PHP extensions and Applications library (the PHP Extension and application Repository). It is a PHP extension and application of a code warehouse, in short, pear is ...

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