What is PHP?

I l @ ve RuBoard

PHP originally stood for "Personal Home Page" as it was created in 1994 by Rasmus Lerdorf to track the visitors to his online resume. As its usefulness and capabilities grew (and as it started being utilized in more professional situations), it came to mean "PHP: Hypertext Preprocessor." (What the definition basically means is that PHP handles data before it becomes HTML ”which stands for HyperText Markup Language.)

According to the official PHP Web site, found at www.php.net (Figure i.1), PHP is a server-side, cross-platform, HTML embedded scripting language. This may sound like a mouthful, but it's fairly straightforward and meaningful when broken down into its parts .

Figure i.1. At the time of this book's printing, this is the current appearance of the official PHP Web site, located at www.php.net. Naturally this should be the first place to look for most of your PHP questions and curiosities. It contains the latest edition of the PHP manual with other user comments added, as well as links to more resources.

graphics/infig01.gif

First, server-side refers to the fact that everything PHP does occurs on the server (as opposed to on the client, which is the Web site viewer's computer). A server is simply a special computer that houses the pages that you see when you go to a Web address with your browser (e.g., Netscape Navigator or Internet Explorer). I'll discuss this process in more detail later in the chapter (see How PHP Works).

When we declare that PHP is cross-platform we are indicating that it can be used on machines running Unix, Windows NT, Macintosh, OS/2, and other operating systems. Again, we are talking about the server's operating system, not the client's. Not only can PHP run on almost any operating system, but, unlike with most other programming languages, your work can be switched from one platform to another with very few or no modifications whatsoever. Naturally you can develop PHP on any operating system, too, just as you can HTML.

To say that PHP is HTML embedded means that it can be put within your HTML code ”HTML being the code with which all Web pages are built. Therefore, the actual programming of PHP can be only slightly more complicated than hand-coding HTML.

Finally, PHP is a scripting language, as opposed to a programming language. This means that PHP is designed to do something only after an event occurs, for example, when a user submits a form or goes to a URL (Uniform Resource Locator ”the technical term for a Web address). Programming languages such as Java, C, and Perl can write stand-alone applications, which may or may not even involve the Web. The most popular example of a scripting language is JavaScript, which commonly handles events that occur within the Web browser, and is somewhat similar to PHP, although it is a client-side technology. Another way to refer to the different types of languages is to use the term interpreted for languages such as PHP and JavaScript, which cannot act on their own, and compiled for those like C and Java, which can.

PHP is currently in Version 4.0 although, as this version is relatively new, many servers are still running Version 3.x. This book will discuss PHP 4 specifically , but the differences between the two versions are insignificant as far as programming is generally concerned . The majority of the benefits in the new version are found in its improved performance. More information about PHP 4.0 can be found at www.zend.com, the minds behind the core of PHP 4.0 (Figure i.2).

Figure i.2. This is the home page of Zend, creators of the programming that is at the heart of PHP 4. Detailed information on the latest version of PHP can be found here.

graphics/infig02.gif

I l @ ve RuBoard


PHP for the World Wide Web (Visual QuickStart Guide)
PHP for the World Wide Web (Visual QuickStart Guide)
ISBN: 0201727870
EAN: 2147483647
Year: 2001
Pages: 116
Authors: Larry Ullman

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net