PHP

Greenland native Rasmus Lerdorf was tired of writing the same code over and over while creating his personal home page dorsum in 1995.

So, he says, he wrote "a very simple parser" to replace tags in an HTML file with some code he'd written in C.

That project evolved into PHP, an open-source scripting language now installed at more than ane in every five Web domains, co-ordinate to an Oct 2001 survey of more 6 million domains conducted past Netcraft, a Bath, England-based Cyberspace consulting company.

More

Computerworld
QuickStudies
PHP fans say the language is uncommonly easy to learn. It has a lot of built-in functions such equally unproblematic connections to databases and back up for the Lightweight Directory Access Protocol (LDAP).

"PHP was adult from the footing up to be a Web platform," says Zeev Suraski, master technical officer at Zend Technologies Ltd. in State of israel and an author of the electric current version of PHP. "Very powerful applications can be created in a very short fourth dimension. . . This is the No. 1 feedback I get from people."

PHP code is highly portable; it moves from one brand of server to another with minimal or no rewrites. This multiplatform support appeals to It managers who don't want to be locked into a single brand.

Free and Piece of cake

Every bit open up-source software, PHP is free for corporate use and works well with other pop open up-source projects, including the Apache Spider web server and the MySQL and PostgreSQL databases.

"If we didn't have PHP, information technology would cost us six to seven times every bit much to operate [our] It environment," says Kevin Crothers, head of corporate Web systems at WorldCom Inc. WorldCom has used PHP for several major Spider web projects, both internal and external, including the front to a searchable database of employees and contractors that contains more 100,000 records. "Information technology's all LDAP-based," he says, noting that PHP had "the strongest LDAP integration we've been able to notice."

PHP uses server resources efficiently, Crothers says. It uses memory sparingly and allows customer-side interpretation of code to shoulder some processing burden.

"There's coin in your pocket correct there," he says, because a PHP-based application requires less server hardware than some other environments. Crothers adds that he has institute PHP to exist both stable and secure, and he believes that the language is very easy to learn compared with competing technologies such as Microsoft Corp.'s Agile Server Pages (ASP) technology for dynamic Web applications.

Room for Improvement

However, many developers generate ASP code from software such equally Microsoft's Visual InterDev, which can be easier for nonprogrammers than coding in PHP, Suraski notes.

At present, at that place are no high-level commercial WYSIWYG Spider web authoring tools that automatically generate PHP pages, which ways yous demand actual programming noesis. That doesn't entreatment to every Web development shop, but Suraski says he believes some PHP authoring tools will be out later on this yr.

He also acknowledges that PHP'southward object-oriented programming adequacy, compared with that of Java, for case, "is not as powerful every bit information technology should be." This tin make PHP a bit more cumbersome for creating very big-scale applications. Yet, improvements are in the works for PHP Version five.0, he said, which is due sometime in the second quarter.

Lerdorf says other upcoming improvements include making PHP Extension and Application Repository (PEAR) more useful. PEAR solves some Spider web-related problems just isn't part of PHP itself. "Y'all will besides see some nice ways to build [Simple Object Admission Protocol/Web Services Description Language] services with PHP," he says.

PHP is an interpreted linguistic communication and doesn't use compiled binary executables, so PHP applications can be more than easily viewed and dissected by competitors, says Crothers. For hiding code or creating applications for resale, products such equally Zend's Encoder volition mask some piece of work.

For professional-level quality assurance and testing, Crothers advocates using a product such equally Komodo from Vancouver, British Columbia-based ActiveState Corp. Komodo'southward integrated development environs is available gratis to individuals and nonprofit organizations.

Ultimately, Crothers says, PHP is an excellent environment for creating Spider web applications for WorldCom. "It does everything," he says.

Above is an case of simple PHP lawmaking for e-mailing information entered into an HTML form, where the form has fields called comments (for comments entered past a user) and frommail (for a user-entered eastward-mail address), likewise as a hidden field tomail (for the address where information should be sent). The e-postal service would be sent with the bailiwick line "User Comments."

In a production environment, additional lawmaking would be added for validation and security.

Run into additional Computerworld QuickStudies

Copyright © 2002 IDG Communications, Inc.