PHP Tutorial

Your cool punch line

A Brief History of PHP

In 1994, an incredibly forward-thinking man named Rasmus Lerdorf developed a set of tools that used a parsing engine to interpret a few macros here and there. They were not extravagant: a guest book, a counter, and some other "home page" elements that were cool when the Web was in its infancy. He eventually combined these tools with a form interpretation (FI) package he had written, added some database support, and released what was known as PHP/FI.

Then, in the spirit of Open Source software development, developers all over the world began contributing to PHP/FI. By 1997, more than 50,000 Websites were using PHP/FI to accomplish different tasks—connecting to a database, displaying dynamic content, and so on.

At that point, the development process really started becoming a team effort. With primary assistance from developers Zeev Suraski and Andi Gutmans, the version 3.0 parser was created. The final release of PHP 3.0 occurred in June of 1998, when it was upgraded to include support for multiple platforms (it's not just for Linux anymore!) and Web servers, numerous databases, and SNMP (Simple Network Management Protocol) and IMAP (Internet Message Access Protocol).

Then, the birth of PHP 4.0 occurred. No small version change, PHP 4.0 marked a complete rethinking of the PHP core and a rewrite of the internals of the scripting language itself. The PHP development team and Zend Technologies produced a remarkable product with nearly a 50-fold performance improvement over version 3.0, with a long list of new and useful features.

The next version, PHP 4, increased the features of PHP but the subsequent version PHP 5 was more devoted to increasing the efficiency of the system than expanding its features. Now PHP can be included within an HTML file and use in world famous website like wordpress which is a type of content managment system.

Go Top

PHP Installation

If you want to run Moodle on your own computer, please see Installing Apache, MySQL and PHP for step-by-step instructions for installation on most popular platforms.

Go Top

How PHP Is Parsed

So you have a file, and in that file you have some HTML and some PHP code. This is how it all works, assuming a PHP document with an extension of .php.

  1. The Web browser requests a document with a .php extension.
  2. The Web server says, "Hey! Someone wants a PHP file. Something else needs to deal with it," and sends the request on to the PHP parser.
  3. The PHP parser finds the requested file and scans it for PHP code.
  4. When the PHP parser finds PHP code, it executes that code and places the resulting output (if any) into the place in the file formerly occupied by the code.
  5. This new output file is sent back to the Web server.
  6. The Web server sends it along to the Web browser.
  7. The Web browser displays the output.

Because the PHP code is parsed by the server, this method of code execution is called server-side. When code is executed by the browser, such as JavaScript, it is called client-side.

To combine PHP code with HTML, the PHP code must be set apart from the HTML. In the next section, you'll learn how this is done, using PHP start and end tags.

PHP Introduction

PHP Basic Development

PHP Control Structures

PHP Functions

PHP Arrays

PHP File System

Working With PHP Forms

PHP Classes And Objects

Introduction To Database

PHP Cookies

PHP Session

Computer SMS


More Free SMS


Review w3schoolas.com on alexa.com


© w3schoolas.com . All right reserved.www.w3schoolas.com Sitemap Overall Visits = 2191