PHP

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

And then, 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 Spider web domains, according to an Oct 2001 survey of more than six million domains conducted by Netcraft, a Bath, England-based Cyberspace consulting company.

More

Computerworld
QuickStudies
PHP fans say the linguistic communication is exceptionally easy to learn. Information technology has a lot of built-in functions such as unproblematic connections to databases and support for the Lightweight Directory Access Protocol (LDAP).

"PHP was developed from the footing up to exist a Web platform," says Zeev Suraski, principal technical officer at Zend Technologies Ltd. in 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. ane feedback I go from people."

PHP code is highly portable; information technology 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 make.

Free and Easy

As open-source software, PHP is costless for corporate employ and works well with other popular open-source projects, including the Apache Spider web server and the MySQL and PostgreSQL databases.

"If we didn't have PHP, information technology would cost u.s. half-dozen 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 Web projects, both internal and external, including the front end to a searchable database of employees and contractors that contains more than 100,000 records. "It's all LDAP-based," he says, noting that PHP had "the strongest LDAP integration we've been able to find."

PHP uses server resource efficiently, Crothers says. Information technology uses retention sparingly and allows customer-side estimation of lawmaking to shoulder some processing burden.

"At that place's money 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 establish PHP to be both stable and secure, and he believes that the linguistic communication is very easy to larn compared with competing technologies such as Microsoft Corp.'s Agile Server Pages (ASP) technology for dynamic Spider web applications.

Room for Comeback

All the same, many developers generate ASP code from software such equally Microsoft'south Visual InterDev, which can exist 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 need actual programming noesis. That doesn't appeal to every Web development store, only Suraski says he believes some PHP authoring tools will be out subsequently this year.

He also acknowledges that PHP'south object-oriented programming capability, compared with that of Java, for example, "is not equally powerful as it should exist." This can make PHP a fleck more cumbersome for creating very large-calibration applications. Withal, improvements are in the works for PHP Version 5.0, he said, which is due onetime 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 part of PHP itself. "You will also see some nice means to build [Simple Object Access Protocol/Spider web Services Description Language] services with PHP," he says.

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

For professional-level quality balls and testing, Crothers advocates using a product such every bit Komodo from Vancouver, British Columbia-based ActiveState Corp. Komodo's integrated development environment is available complimentary to individuals and nonprofit organizations.

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

Higher up is an case of elementary PHP code for e-mailing data entered into an HTML grade, where the class has fields chosen comments (for comments entered by a user) and frommail (for a user-entered e-mail accost), equally well as a hidden field tomail (for the address where information should be sent). The e-mail 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.