magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 1998 > 02 > Features  

Dynamic Web Pages with PHP3

An Embedded Scripting Language for the Web

By Rasmus Lerdorf

PHP is a freely available, HTML-embedded scripting language that lets you embed special tags to create your script right in an HTML file. PHP can be integrated into the Web server itself, eliminating the need to start up a separate CGI program to generate the Web page, which can lead to dramatic performance increases on some systems. In this article, I'll describe how PHP came into existence, introduce some PHP basics, then share some useful, instructive scripts to get you started.

PHP3 History

PHP began as a simple CGI wrapper written in Perl that I used to keep track of who had accessed my online resume. I then rewrote the wrapper in C to speed it up and use less resources. At the same time, I needed a way to glue my home page to a database, so I wrote the Form Interpreter (FI), a tool to embed SQL queries inside Web pages and handle form input. These tools were never intended for public use, but as so often happens, people who saw my Web pages asked for a copy of what I was using. So, I bundled up my two tools, named them the Personal Home Page Tools, and added some documentation; thus was born PHP version 1.0.

The more people used the package, the more features they asked for. I had written a small, simple macro-replacement filter, but people wanted conditional macros, loops, and arrays, which called for a complete language parser. I read all I could find on YACC and GNU Bison (automatic parser-generation software) and created a simple parser that supports variables, arrays, math-operator precendence, conditionals, and more.




  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2