|
Chapter 14
PHP Extensions
In This Chapter
Understanding extensions
Installing PEAR
Using PEAR packages
T
he PHP architecture consists of a PHP core and PHP extensions. The PHP
core provides the basic functionality of the language.
PHP’s great flexibility and power depend greatly on its hundreds of functions,
which consist of built-in functions and functions available in a PHP extension.
Many PHP built-in functions are discussed throughout this book, and Appendix
B provides a reference list of many functions. However, many more functions
are available in PHP through the use of extensions.
Most PHP functions are contained in the PHP extensions. Extensions broaden
the capabilities of PHP. Several core extensions are compiled into PHP and are
always there by default. Other standard extensions are included in the PHP
distribution, but you must add them to PHP before you can use their functions.
PHP database functions are among those included in the PHP distribution
that must be activated before they can be used (as discussed in Chapter 12).
In addition, many extensions are written and made available by individuals.
Many of the best of these are part of PEAR,the PHP Extension and Application
Repository.
This chapter discusses available extensions and how to get and use them.
Investigating the Basic Extensions
The basic PHP distribution includes several extensions. These are compiled
into PHP, and their functions are available for your use. You don’t actually need
to know about these extensions. You don’t need to do anything to activate
them; you can just use their functionality. (In fact, if you don’t want them, you
|