FeaturesAs a programming language for the Web, PHP is hard to ignore. Clean syntax,
object-oriented fundamentals, an extensible architecture that encourages innovation,
support for both current and upcoming technologies and protocols, and excellent
database integration are just some of the reasons for the popularity it currently
enjoys in the developer community.
Because PHP uses a consistent and logical syntax, and because it comes with
a clearly written manual, even novices find it easy to learn. In fact, the quickest
way to learn PHP is to step through the manual’s introductory tutorial, and then
start looking at code samples off the Web. Within a few hours, you’ll have learned
the basics and will be confident enough to begin writing your own scripts. This
adherence to the KISS (Keep It Simple, Stupid) principle has made PHP popular
as a prototyping and rapid application development tool for web applications. PHP
can even access C libraries and take advantage of program code written for this
language, and the language is renowned for the tremendous flexibility it allows
programmers in accomplishing specific tasks.
With programming languages, portability—the ease with which a program canbe made to work on different platforms—is an important factor. PHP users have
little to fear here, because cross-platform development has been an important
design goal of PHP since PHP 3.0. Today, PHP is available for a wide variety of
platforms, including UNIX, Microsoft Windows, Mac OS, and OS/2. Additionally,
because PHP code is interpreted and not compiled, PHP scripts written on one
platform usually work as is on any other platform for which an interpreter exists.
This means that developers can code on Windows and deploy on UNIX without
any major difficulties.
Out of the box, PHP scripts run faster than most other scripting languages, withnumerous independent benchmarks putting the language ahead of competing
alternatives like JSP, ASP.NET, and Perl. When PHP 4.0 was first released, it
raised the performance bar with its completely new parsing engine. PHP 5.0
improves performance even further through the use of an optimized memory
manager, and the use of object handles that reduce memory consumption and
help applications run faster.
Possibly the best thing about PHP is that it’s free—its source code is freely
available on the Web, and developers can install and use it without paying licensing
fees or investing in expensive hardware or software. Using PHP can thus significantly
reduce the development costs of a software application, without compromising on
either reliability or performance. The open-source approach also ensures faster bug
fixes and quicker integration of new technologies into the core language, simply
due to the much larger base of involved developers.
Keeping future growth in mind, PHP’s creators built an extensible architecturethat enables developers to easily add support for new technologies to the language
through modular extensions. This extensibility keeps PHP fresh and always at
the cutting edge of new technology. To illustrate this, consider what PHP lets you
do through its add-on modules: dynamically create image, PDF, and SWF files;connect to IMAP and POP3 servers; interface with MySQL, Oracle, PostgreSQL
,and SQLite databases; handle electronic payments; parse XML documents; and
execute Perl, Java, and COM code through a PHP script. And as if all that wasn’t
enough, there’s also an online repository of free PHP classes called PEAR, the
PHP Extension and Application Repository, which provides a source of reusable,
bug-free PHP components.