As the Internet continues to evolve, so too does the necessity for a language that addresses
the functionality needs of the Internet’s web viewers. Over time, some programming languages
have come and gone, and others have continued to evolve. Several languages have
moved into the lead in the race for supremacy. Although languages such as ColdFusion,
ASP.NET, and CGI certainly have their advantages, PHP seems to be the developer’s choice
for a versatile, open-source solution.
PHP has grown over the years and, thanks to its devotees, has continued to adopt the
functionality most preferred by its user base. By actually listening to the developers to help
guide PHP’s development path, the PHP creators have introduced some impressive functionality
over the years. However, PHP 4, while a sound developmental language and tool, was
lacking on a few fronts. For instance, it had a means for developers to take an object-oriented
approach, but several key pieces of functionality were not implemented, such as exception
handling and session support (for objects).
PHP 5 has changed all that. No longer must developers write classes that are missing
functionality. Available to PHP is a full set of object-oriented development tools. Of particular
note in PHP 5 is the ability to protect class variables in several ways. In addition, inheritance
difficulties are now a thing of the past, and exception handling has become a nice way of taking
care of pesky errors and validation.
PHP 5 Recipes is for any PHP programmer looking for fast solutions to their coding problems
and wanting to capitalize on PHP 5’s new functionality. A basic knowledge of PHP is expected
and will come in handy when using the recipes in this book. Ideally, any PHP programmer,
from beginner to expert, will be likely to learn new things about PHP, especially PHP 5, and
gain a cutting-edge script or three to add to their repertoire.