Subscribe to our e-mail newsletters
For more info on a specific newsletter, click the title. Details will be displayed in a new window.
Application/Web Development
Computerworld Daily News (First Look and Wrap-Up)
Computerworld Blogs Newsletter
The Weekly Top 10
More E-Mail Newsletters 
Computerworld 2007Subscribe to Computerworld
40 years of the most authoritative source of news and information for IT leaders.

Quickstudy: Personal Home Page (PHP)

 

Sign up to receive Security Resource Alerts

February 04, 2002 (Computerworld) -- Greenland native Rasmus Lerdorf was tired of writing the same code over and over while creating his personal home page back 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 one in every five Web domains, according to an October 2001 survey of more than 6 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 built-in functions such as simple connections to databases and support for the Lightweight Directory Access Protocol (LDAP).

"PHP was developed from the ground up to be a Web platform," says Zeev Suraski, chief technical officer at Zend Technologies Ltd. in Israel and an author of the current version of PHP. "Very powerful applications can be created in a very short time. . . 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 Easy

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

"If we didn't have PHP, it would cost us six to seven times as much to operate [our] IT environment," says Kevin Crothers, head of corporate 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 resources efficiently, Crothers says. It uses memory sparingly and allows client-side interpretation 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 found PHP to be both stable and secure, and he believes that the language is very easy to learn compared with competing technologies such as Microsoft Corp.'s Active Server Pages (ASP) technology for dynamic Web applications.

Room for Improvement

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

At present, there are no high-level commercial WYSIWYG Web authoring tools that automatically generate PHP pages, which means you need actual programming knowledge. That doesn't appeal to every Web development shop, but Suraski says he believes some PHP authoring tools will be out later this year.

He also acknowledges that PHP's object-oriented programming capability, compared with that of Java, for example, "is not as powerful as it should be." This can make PHP a bit more 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 part of PHP itself. "You will also see some nice ways to build [Simple Object Access Protocol/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 as Komodo from Vancouver, British Columbia-based ActiveState Corp. Komodo's integrated development environment is available free to individuals and nonprofit organizations.

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

Above is an example of simple PHP code for e-mailing data entered into an HTML form, where the form has fields called comments (for comments entered by a user) and frommail (for a user-entered e-mail address), as 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 be added for validation and security.


See additional Computerworld QuickStudies




Print this Story Send Us Feedback E-mail this Story Digg! Digg this Story Slashdot this Story
PHP or Perl?
PHP
Q&A: PHP creator Rasmus Lerdorf
"IBM's old AS400 technology is fading fast, if product names are any indication...." Read more...
"Systems support pilot fish starts getting reports that a special Y2k tool has stopped working — in early 2008...." Read more...
Read more Development posts or See all Blogs
Microsoft promises four patches next week
Google gives away home-cooked Web application security scanner
Expect iPhone, Fourth of July scams, security firm says
More top stories...
Microsoft trumpets security additions in upcoming IE8
Apple cuts price of high-end SSD MacBook Air by $500
Ultrathin showdown: Apple MacBook Air vs. Lenovo ThinkPad X300 vs. Toshiba Portege R500
All it takes is a couple hours and about $125 to breathe new life into an old laptop. Here's how.
Is Microsoft's Golden Age over? What are Gates' most memorable quotes? Find out in Computerworld's complete coverage of the end of the Bill Gates era at Microsoft.
There are some things your CIO definitely doesn't want to hear. Also don't miss the flipside, Five things you should always tell your boss.
With its latest version, Mozilla's browser continues to raise the bar for what Web browsers should be.
Reviews, analyses, how-tos, visual tours, hot issues and predictions about Microsoft's new OS.
Four years from now, the IT field will be a vastly different place. Will you be ready?
All Zones
Application Performance Zone
Business Continuity Zone
Data Center Management Zone
Enterprise-Class Security Zone
The File Data Management Zone
Grid Computing on Windows Zone
Security Management Zone
ITIL Best Practices Zone
The SAS Zone
Storage Virtualization Zone
Business Intelligence and Analytics Zone

Ads by TechWords

See your link here
Sold on SOA

(Source: Computerworld) It's the hot technology for most large companies, but business, technical and cultural issues must be addressed for a successful SOA implementation. Get the whole story, from the big picture to the how-to-do-it details, in this Executive Bulletin. Download this Executive Bulletin (a $49.95 value) for Free, compliments of Fujitsu.
Download this executive briefing download
Virtualization Everywhere
Download this white paper, free, compliments of Citrix.
(Source: Citrix) Adoption of virtualization is concentrated among large enterprises, while adoption by mid-sized companies has been much slower. For these companies, the cost and complexity of server virtualization solutions has been a barrier.

In this paper, we'll discuss how Citrix XenServer" provides simple, economical server virtualization for any size company. Download now!

Download this white paper go
Why SaaS is Vital to Email and Web Security
Why SaaS is Vital to Email and Web Security
Download this webcast, free, compilments of Webroot Software
Go to the webcast 
White Papers
Read up on the latest ideas and technologies from companies that sell hardware, software and services.
Deploying Virtualized NetWare on Linux Whitepaper
Toward More Flexible, Next-Generation Collaboration Solutions
Driving Business Success Through Workgroup Choice and Flexibility
View more whitepapers