Chapter 1. Introducing PHP

Welcome to the world of PHP, one of the Web's most popular programming languages. According to Netcraft (www.netcraft.com), PHP was running on more than 20 million Web servers in July 2007 (http://www.php.net/usage.php). At the time of writing, it's the fourth most popular programming language in the world according to TIOBE (http://www.tiobe.com/index.php/content/paperinfo/tpci/), beaten only by Java, C, and C++. With the introduction of version 5.3, there's never been a better time to learn PHP.

In this chapter you:

  • Get a gentle introduction to PHP in general, and the new features of PHP 5.3 in particular

  • Learn what PHP is, what it can be used for, and how it stacks up against other dynamic Web technologies

  • Take a look at the history of PHP, so you can see how it has evolved over the years, from its humble beginnings to the rich Web development framework it is today

What Is PHP?

PHP is a programming language for building dynamic, interactive Web sites. As a general rule, PHP programs run on a Web server, and serve Web pages to visitors on request. One of the key features of PHP is that you can embed PHP code within HTML Web pages, making it very easy for you to create dynamic content quickly.

What exactly does the phrase "dynamic, interactive Web sites" mean? A dynamic Web page is a page whose contents can change automatically each time the page is viewed. Contrast this with a static Web page, such as a simple HTML file, which looks the same each time it's ...

Get Beginning PHP 5.3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.