PHP

Greenland native Rasmus Lerdorf was tired of writing the aforementioned code over and over while creating his personal dwelling page back in 1995.

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

That project evolved into PHP, an open-source scripting language now installed at more than than i in every five Web domains, according to an Oct 2001 survey of more than than six million domains conducted by Netcraft, a Bath, England-based Internet consulting company.

More

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

"PHP was developed from the ground upwards to be a Web platform," says Zeev Suraski, chief technical officer at Zend Technologies Ltd. in Israel and an writer of the electric current version of PHP. "Very powerful applications can exist created in a very brusk time. . . This is the No. 1 feedback I become from people."

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

Complimentary and Easy

Equally open-source software, PHP is free for corporate utilise and works well with other pop open-source projects, including the Apache Web server and the MySQL and PostgreSQL databases.

"If we didn't take PHP, it would cost the states six to seven times as much to operate [our] It environment," says Kevin Crothers, head of corporate Spider web systems at WorldCom Inc. WorldCom has used PHP for several major Spider web projects, both internal and external, including the forepart to a searchable database of employees and contractors that contains more 100,000 records. "It'south all LDAP-based," he says, noting that PHP had "the strongest LDAP integration nosotros've been able to detect."

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

"There's money in your pocket right there," he says, because a PHP-based application requires less server hardware than some other environments. Crothers adds that he has plant PHP to exist both stable and secure, and he believes that the linguistic communication is very easy to acquire compared with competing technologies such as Microsoft Corp.'s Active Server Pages (ASP) technology for dynamic Spider web applications.

Room for Improvement

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

Now, there are no loftier-level commercial WYSIWYG Web authoring tools that automatically generate PHP pages, which means you demand actual programming knowledge. That doesn't appeal to every Spider web development shop, just Suraski says he believes some PHP authoring tools will be out later this year.

He besides acknowledges that PHP's object-oriented programming capability, compared with that of Java, for example, "is not equally powerful as it should be." This can make PHP a bit more than cumbersome for creating very large-scale applications. However, improvements are in the works for PHP Version 5.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 Web-related problems but isn't function of PHP itself. "Yous volition also encounter some squeamish ways to build [Unproblematic Object Access Protocol/Spider web Services Description Language] services with PHP," he says.

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

For professional-level quality assurance and testing, Crothers advocates using a product such equally Komodo from Vancouver, British Columbia-based ActiveState Corp. Komodo's integrated evolution environment is bachelor free to individuals and nonprofit organizations.

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

Above is an example of uncomplicated PHP code for due east-mailing information entered into an HTML form, where the grade has fields called comments (for comments entered by a user) and frommail (for a user-entered electronic mail address), as well as a hidden field tomail (for the address where information should be sent). The e-post would be sent with the subject line "User Comments."

In a production environment, additional code would exist added for validation and security.

See additional Computerworld QuickStudies

Copyright © 2002 IDG Communications, Inc.