True power in a programming language comes from its extensibility. A good programming language can be expanded and extended in ways the designer never could have imagined originally.
If you have ever programmed in Perl, chances are you have heard of CPAN, the Comprehensive Perl Archive Network. As you know, it's an easy way to add functionality to Perl. Most Perl programmers can't see how they ever lived without it.
PHP has a similar capability. It's called Pear: the PHP Extension and Add-On Repository. Pear is a framework and distribution system for reusable PHP components.
Joao Prado Maia has written an Introduction to Pear that will help you get started. He takes you through the steps required to install Pear and get it configured.
In a second article, he takes us through a more Detailed Look at Pear, including a look at what is going on behind the scenes. He also gives a bit of information on
PEAR::DB, one of the most common modules used in Pear.
PHP scripts are compiled and HTML is generated each time a web page is requested. Pear already has a module to help out in these types of situations. Sebastian Bergmann uses Pear caching to store dynamic requests and speed up PHP web sites.
If you need more information on Pear and PHP, check out these resources:
Chris Coleman is the Open Source Editor for the O'Reilly Network and is actively involved with community projects such as OpenPackages.org and Daemon News.
Return to the PHP DevCenter.
Copyright © 2009 O'Reilly Media, Inc.