|
Introduction to PHP
Introduction
This is a little information to help you know what PHP is all about.
What Is PHP
It's official name is PHP (Hypertext Preprocessor), and it is a server-side scripting language. It provides an easier way to accomplish web related programming tasks, which are accomplished only with difficulty in more complex and powerful languages, such as Perl or C. It is ideally suited to the web because PHP scripts live inside web pages right along with the HTML tags and content. For that reason, PHP is called an embedded scripting language. Developers can embed programs in their web pages, making them dynamic. They can treat programs just like web pages. PHP pages can contain both regular HTML and PHP code. This allows you to develop web applications quickly. However, unlike some web scripting languages, PHP makes a clear distinction between sections of PHP code and sections of the HTML document. When the web server fills a request for a PHP enabled page, it first looks through the page content for sections of PHP code and executes any it finds. Any normal HTML sections are passed to the browser without any changes. This means that you can freely mix snippers of program into a web page anywhere.
When you request a PHP page, something like http://domain.com/index.php, the web server fires up the PHP parsing engine. The PHP parser then finds the file and scans it for PHP code. When the PHP parser finds PHP code, it executes that code and places the output (if any) into the place in the file formerly occupied by the code. The generated output is now sent back to the web server. The web server now sends the output along to the web browser, which displays it to you.
Brief History of PHP
In 1994, a man named Rasmus Lerdorf developed a set of tool that used a parsing engine to interpret a few macros. The were very basic: a guest book, a counter, and some other "home page" type elements that where cool for a site. He later combined these tools with a form interpretation (FI) package he had written, added some database support, and released what was know as PHP/FI.
Then, by the magic of Open Source software, developers all over the world began contribution to PHP/FI. By 1997, more than 50,000 were using PHP/FI to accomplish basic web task.
The development started to really become a team effort. With assistance from developers Zeev Suraski and Andi Gutmans. PHP 3.0 was created. The final release of PHP 3.0 occurred around June of 1998, when it was upgraded to include support from multiple platforms and web servers.
PHP now runs on millions of web servers around the world. PHP 4.0.0 has been released with support for the Zend engine. The latest version of PHP includes a big security bug fix plus a whole new and better variable system.
Whats Does PHP Do?
PHP does anything you want. According to the PHP Manual, "The goal of the language is to allow Web developers to write dynamically generated pages quickly."
Some common uses of PHP:
- Dynamic web pages
- Preform system functions
- Gather data from GET or POST
- Access databases
- Set Cookies
- Sessions
- User authentication
- Create images on-the-fly
- Manipulate and encrypt data
These are just some everyday uses of PHP. PHP also has support for higher-level functions. The possibilities are basicly endless.
Is PHP Right For You?
You are the only person to decide this. In most cases PHP is the right scripting language for you (whether in the personal or commercial realm). PHP is flexible, fast, and simple, yet powerful in its output.
Links
|