Приглашаем посетить
Чарушин (charushin.lit-info.ru)

Chapter 25: PHP Extension Libraries

Table of Contents
Previous Next

Chapter 25: PHP Extension Libraries

Overview

PHP comes with over 75 extensions to the core language. These extensions allow developers to handle such diverse tasks such as the creation of PDF files to scripting Flash movies, from creating dynamic WAP and WML pages to creating images on the fly.

Extension support in PHP came with the release of PHP3 in which dynamic module support was made available. This meant (and is still true for PHP4) that third-party authors could easily write PHP extensions to add functionality to their programs.

One of the first and most widely used extension libraries is the PHP Base Library (also known as PHPLIB). PHPLIB, though written explicitly for PHP3, still contains many useful session handling functions, which you might like to have a look at. PHPLIB is available at http://phplib.netuse.de/. Note that PHPLIB is not an extension library per se, it is a collection of PHP scripts which are intended to extend the functionality of PHP3.

PHP-GTK is a new library, intended to give PHP functionality outside of the web atmosphere. It is now available at http://www.php.net/. This extension implements GTK+ language bindings, allowing an object-oriented interface to GTK+ functions and classes. This allows programmers to write cross- platform GUI applications. Note that GTK+ is not for use in an Internet environment and is provided solely for the creation of standalone applications.

Using libraries with PHP sometimes seems like overkill. Programs which make use of extensions can be composed of many function calls to perform a simple task such as generating text or outputting an image. However, keep in mind that PHP extension libraries provide wonderful ways of achieving tasks that would otherwise be impossible using PHP alone.

Note 

Note that the code for the examples in this chapter, and working examples of the code snippets, are available for download on the Wrox web site (http://www.wrox.com/).


Table of Contents
Previous Next