Free Software Profile:
PHP
By
Christophe Lauer, Consultant (clauer@techmetrix.net)

 |
Product: |
PHP, PHP3
version 3.0.14, PHP4 |
| Platforms: |
All Unix,
Windows 9x and NT, Mac |
| Origin: |
Collaborative development, led by the PHP Development
Team |
| License: |
GNU GPL
for PHP3, PHP License for PHP4 (see details)
and QPL for Zend |
| Support: |
Mailing
list and newsgroups |
| URL: |
http://www.php.net
|
 |
|
General
Overview
PHP is an HTML-embedded scripting language. Like Microsoft's
ASP technology, it is designed to be processed on the server side
and produce dynamic Web pages.
PHP3 is the third version of the interpreter initially
developed by Rasmus Lerdorf. It was originally destined to bring
dynamic scripting functionality to personal HTML Web pages, which
explains why it was christened Personal Home Page. For the second
version of PHP, its engine was rewritten so that HTML form
management functionality could be added, and its name became
PHP/Form Interpreter (PHP/FI) to reflect this change. The arrival of
PHP3 coincided with the rise of the Internet wave, a time when many
personal and professional users were in need of dynamic behavior on
their Web sites: online catalogs and e-commerce applications with
shopping cart management. PHP now officially stands for PHP:
Hypertext Preprocessor.
PHP4 has finally obtained the 'Release' tag and can be
downloaded at http://www.php.net./version4. Many high-traffic sites
have already been using PHP4 for several months and no major
problems have been reported. The interpreting engine has been
completely rewritten in PHP4. In terms of internal architecture,
this means that the interpreter is clearly separated from the rest
of PHP (even if this is totally transparent to users or developers).
In light of this, PHP's developers came up with a generic engine
called Zend (http://www.zend.com/), whose name is a contraction of
its author's names: Zeev Suraski and Andi
Gutmans. TOP
Architecture and Functionality
PHP3
and PHP4 are open software programs. Indeed, they propose an
API that can be used to add functions to the languages. It is
in this manner that numerous contributors progressively built upon the
language's core functions and instructions by adding functions that
make it possible to exploit all of the language's protocols and
standards. The following elements can be cited as examples: an
XML parser, manipulation of WDDX data, access to LDAP directories, and
support for IMAP, POP and NNTP protocols. As such, PHP natively
provides access to all existing. and future. intranet
standards, and this is in a large part due to the community of
developers involved in PHP's development. Moreover, PHP interfaces
with a large number of proprietary and free DBMSs (MySQL, PostgrSQL,
Oracle, Sybase, Informix, IBM DB2 and so on). Unlike Perl which
offers an abstraction layer via DBI and DBDs, access to the various
DBMSs depends on DBMS-specific functions. PHP does not offer
database connection pooling.
PHP is multi-platform when it comes to operating systems and
HTTP servers. Thus, PHP can run on all free and proprietary Unix
systems, and on all HTTP servers supporting at least the CGI
interface.
Nonetheless, PHP's favorite platform remains the one made up
of the Unix/Apache couple. PHP3 can be used in CGI mode on most HTTP
servers, but it offers the most features and much better
performances when it is used as a loadable Apache module (like
mod_perl). With PHP4 one now has the possibility to use PHP as an
ISAPI filter with Microsoft's HTTP server.
PHP4's architecture is more open and scalable than that of
PHP3, characteristics that spawned the ISAPI interface. Among its
new functionalities, one finds session management and context
variable manipulation primitives. In its latest version, PHP4
provides openness to the world of Java, thus enabling servlet
execution and direct instantiation and manipulation of Java classes
as if they were simple PHP classes. This "gateway" to Java has been
tested using the JVMs of Sun, BlackDown and Kaffe on Linux and
Windows NT systems only.
In terms of performance, PHP4 improves on its predecessor by
at least 15%. In order to obtain even better performances, one must
use PHP4 extensions. One of the three extensions, the optimizer, can
currently be downloaded at no charge. It is important to point out
that this optimizer is situated at the level of the interpreter's
Zend engine. Therefore, this optimizer is not available under a free
license, but under the same license as Zend, the QPL. One of the
other announced extensions is the execution cache, which follows the
same principle as the mod_perl Registry by enabling the storage of
scripts that have been pretokenized, preanalyzed and preprocessed.
The third extension will be a compiler for all PHP scripts. However,
the compilers will probably come from third-party vendors and may be
available under a free license.
PHP's open API makes it possible to extend the language by
adding processing functions that are coded in C and used from PHP.
These functions aim to improve performance, and do so in a
transparent manner. In practice, this possibility is never used. The
arrival of optimizers and other third-party compilers should provide
a more elegant solution to performance problems than a combination
of C and PHP.
Beyond the language itself, one of PHP's current strengths is
that is offers a set of "ready-to-use" building blocks that were
developed by PHP users and made available under free licenses. Among
these essential building blocks one finds database administration
interfaces such as phpMyAdmin and postgresAdmin; interactive forums
such as Phorum, NeoBoard and W-Agora; HTML mail server access
interfaces such as IMP, FocalMail; management of shared calendars
and agendas such as TimeSheet and Keystone; indexing and search
engines such as UdmSearch; HTML page templates such as FastTemplate;
e-commerce business solutions such as eShop and FishCartSQL; and
helpdesk management such as Ministry of Truth. TOP
Distribution
- PHP
is principally available as source code for Unix and similar
systems, and Windows platforms. Nonetheless, the binary units that
are precompiled for Windows can be downloaded directly from the
official Web site.
- PHP
has become a part of all Linux distributions; it can be found as
RPM or DEB packages, or in the software packages ported to
FreeBSD.
- No
official support, but there is a mailing list.
- GNU
GPL for PHP3, PHP License for PHP4 (see details),
but it is important to note that the Zend engine is available
under a QPL license, which is the license for Troll Technologies'
Qt library.
|
The
Pros |
The
Cons |
|
- Powerful, open and scalable
- A large (and ever-growing) number of
extensions
- Support for all Web standards
- Easy to learn
|
- Rudimentary session management
- Database access is not unified
- No database connection pooling
|
|
TOP
TechMetrix Research is a technically focused analyst firm focused on e-business application development needs. Based in Boston, Mass., the firm publishes comparison reports and product reviews designed to aid enterprises with decision making and to keep pace with the fast-moving e-business market.
TechMetrix is a U.S.-based subsidiary of SQLI, a European company that offers on-site development services to international organizations. SQLI specializes in e-business project development.