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: 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) Direct Download benchmark Tool class file
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 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 http://pear.php.net/
Pear Introduction: Write your next PHP program with Pear