Web Design & Development

[ Web Design & Development Topics ]

PHP Defined

PHP in a nutshell

A more detailed description:

PHP originally stood for "Personal Home Page" but has now evolved to "Hypertext Preprocessor".  It was developed by Rasmus Lerdorf.  PHP is just beginning to gain a strong foothold in Web development.  Although it has been around for a few years (more than three) it remained a silent player until recently.  It is my belief that it's hold will continue to grow in the future.  So what is it?  Well, "PHP is a server-side, html-embedded, cross-platform scripting language. In simpler terms, PHP provides a way for you to put instructions in your html files to create dynamic content. These instructions are read and parsed by the web server; they never actually make it to the browser that is displaying the page. The web server replaces your PHP code with the content that the code was written to produce." (Spainhour & Eckstein, p. 309). For example, PHP code could be used to query for information in a database, based on who the user logged in as.  This is similar to what ASP  or JSP [described above] does, however PHP runs on virtually all platforms and is open-source (free).  As CNet Builder.com comments, "PHP is a server-side scripting language for creating dynamic Web pages. You create pages with PHP and html. When a visitor opens the page, the server processes the PHP commands and then sends the results to the visitor's browser, just as with ASP or ColdFusion. Unlike ASP or ColdFusion, however, PHP is Open Source [that means it is free] and cross-platform. PHP runs on Windows NT and many Unix versions, and it can be built as an Apache module and as a binary that can run as a CGI."  PHP was built from the ground up to be a Web application development language.

Web Developer gives a good assessment of how PHP stacks up compared to ASP.  Web Developers Virtual Library notes, "Early era web developers with dynamic ambitions had little more than server side includes in their toolbelts -- it was a dark era indeed. The need for embedded server-parsed scripting languages was apparent, and Microsoft went after this hunger with their ASP, or Active Server Pages, technology. The concept behind ASP, and all other embedded server-parsed languages, is premised upon embedding programming code within the html that makes up a web page. The web server interprets and executes this code, replacing the code with its results, and delivering the resulting web page to the browser. Popular though ASP became, many developers continued wanting for a more stable and less proprietary solution: enter PHP, an open-source server-parsed embedded scripting language."  By the way, there are now free tools to convert ASP to PHP. 

PHP3.0 commands can be easily inserted alongside html. This provides an easy way to incorporate dynamic information within what was previously a static document.

Drawbacks: 

Non-Web References

Spainhour, S. & Eckstein, R.  (1999)  Webmaster in a Nutshell.  O'Reilly and Associates, Inc.  Sebastopol, CA.