PHP is the open alternative to ASP for Web sites, writes Nick
Langley.
What is it?
PHP stands for PHP: Hypertext Preprocessor
- one of those recursive acronyms like GNU (GNU's Not Unix) which
confirm prejudices about geeky humour.
It is an HTML-embedded scripting language, similar in application
to Microsoft's Active Server Pages (ASP). It is used to create
dynamic Web pages. Unlike ASP, it is an open source product,
available free, and supported by a community of developers and
users.
Also unlike ASP, which requires the full infrastructure of
Microsoft technology, PHP is platform-independent.
Until recently it was most associated with Apache and Linux but it
is now being taken up by Microsoft users.
Where did it originate?
PHP was created in 1994 by
Rasmus Lerdorf to keep track of who was looking at his online CV.
He called it Personal Home Page tools. Like Linux, PHP was taken up
by an enthusiastic community of open source users, who added their
own code to it. Originally based on another scripting language,
Perl , PHP includes syntax borrowed from Java and C.
In 1997 it was completely rewritten by Andi Gutmans and Zeev
Suraski. With Lerdorf's co-operation, this commercially robust
version was released as PHP3.
The current version, PHP4, has improved modularity, support for a
wider range of databases, and better performance when handling
complex applications. PHP4 and the forthcoming PHP5 are built on
the Zend "engine" created by Gutmans and Suraski.
What is it for?
At its simplest, you add embedded code
to HTML to do the dynamic stuff on your Web pages. Originally
devised as a forms interpreter (it used to be called PHP/FI), PHP
can collect data from Web page users or retrieve and modify data in
databases and on other Web pages.
What makes it special?
PHP resides on the server, and
can be used by all current Web browsers, making it completely
transparent to users.
Because PHP was redesigned from the ground up as a scripting
language, it contains a lot of pre-built functionality to make life
easier for developers. Champions claim it creates faster, shorter,
more efficient code than ASP.
It is compatible with about 20 different databases and is
particularly closely integrated with the rising star among open
source databases, MySQL.
How difficult is it?
Developers with a working
knowledge of HTML and either C, Java or Perl should pick it up
easily.
Where is it used?
The official PHP Web site (
www.php.net/) claims more
than three million Web sites use it. It is shipped with Linux
distributions such as Red Hat, and the Apache Web server. You can
buy it as an Apache/MySQL/PHP bundle (Foxserv) or an integrated
development environment (Nusphere PHPEd).
What does it run on?
Unix and Linux variants, all
versions of Windows, MacOS, Netware, and minority-interest
operating systems such as OS/2 and AmigaOS.
Not to be confused with
A designer drug favoured by
clubbers; an academic qualification you can buy from the University
of Spam.
Few people know that
The name "Zend" was created from
the forenames of its founders, Zeev and Andi.
What is coming up?
PHP5, due for release in the summer, will provide better
performance and a more complete object-oriented programming
environment, enabling it to front-end J2EE and .net applications
more effectively.
Training
You can download PHP4 from the official PHP
Web site at
www.php.net/
or from the Zend Web site at
www.zend.com/.
Downloadable manuals can also be found on these sites, along with
tutorials and lists of links to PHP scripts and training
resources.
Web developers with PHP skills can expect to earn between £23,000
and £35,000 per annum.