WWW FAQs: What is PHP?


2007-06-26: PHP is a popular programming language for extending web pages with dynamic features. While plain-vanilla HTML can lay out an attractive page and perhaps present forms for users to enter information, HTML can't actually do anything with the data that the user enters in the form. This is where web server extension languages like PHP come in, providing a way to handle form submissions and other user requests by accessing databases, sending email, generating images on the fly and performing other actions.

PHP is currently the most popular web server extension language, used by many websites both large and small. Its popularity is partly due to its free, open-source nature and partly due to its friendliness and convenience. Tasks such as reading an entire file and outputting it to the web browser can be accomplished with a single line of PHP code. And PHP programmers can begin by sprinkling a small amount of code into a page otherwise made up entirely of HTML— a convenience also available in Microsoft's ASP.NET and other extension languages.

For more information, visit www.php.net, PHP's home on the web. See also my article how can I receive form submissions, which provides a quick overview of PHP programming.

"But what does PHP stand for?"

PHP stands for "PHP Hypertext Preprocessor." Yes, you read that right— "PHP" does appear in its own expansion. Recursive acronyms like this one are a popular inside joke in the open source community.

Legal Note: yes, you may use sample HTML, Javascript, PHP and other code presented above in your own projects. You may not reproduce large portions of the text of the article without our express permission.

Got a LiveJournal account? Keep up with the latest articles in this FAQ by adding our syndicated feed to your friends list!