1.1. How Extensions Fit into the PHP Architecture

Here are the three basic types of PHP extensions:

  • Zend engine extensions: These extensions modify the basic nature of PHP by extending or altering the Zend engine. Zend is responsible for parsing and interpreting human-readable (more or less) PHP into machine-level instructions. Unless you're extremely familiar with programming language design and are comfortable performing brain surgery on the PHP language, you can pretty much leave Zend extensions alone. Just realize that these extensions are available, and that you can compile PHP with Zend extensions to modify the core functionality of PHP if you really feel like it.

  • Built-in extensions: This type of extension is much less intimidating than Zend engine extensions. Built-in extensions are code libraries that provide some bit of functionality. These extensions are so plain useful that just about everybody ends up using them, so the PHP development team went ahead and bundled them with PHP. In most cases, you can compile PHP without support for any given extension. For example, if you don't plan on generating dynamic images, you don't need the GD extension, and compiling PHP without it saves resources.

  • External extensions: Sometimes, an extension is intended to solve one very specific problem. Other extensions simply haven't gathered enough popularity to be promoted to built-in extensions. Either way, you can find a lot of really useful extensions available, just waiting for you ...

Get PHP & MySQL® Web Development All-in-One Desk Reference for Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.