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