Search This Blog

Thursday, 7 February 2013

Introduction to PHP Programming Language

1 comments
PHP – Programming Language for Web
PHP is a simple yet powerful language designed for creating dynamic content of a web page. Web sites carry satellite images of Earth in its entirety, search for life in outer space, and house personal photo albums, business shopping carts, and product lists. Many of those web sites are driven by PHP, an Open Source Scripting Language, primarily designed for generating HTML content.
Since its inception in 1994, PHP has swept the web and continues its phenomenal growth with recent endorsements by IBM and ORACLE corporations. Also, the millions of web sites powered by PHP are testament to its popularity and ease of use. In general, PHP can be used in three primary ways:
  1. Server-side Programming: PHP was originally designed to create dynamic web content, and it is still best suited for that task. To generate HTML, we need the PHP parser and a web server. PHP has also become popular for generating XML documents, graphics, Flash animations, PDF files, and more.
  2. Command-line Scripting: PHP can run scripts from the command-line, much like Perl, awk, or the UNIX shell. We might use the command-line scripts for system administration tasks such as backup and log parsing.
  3. Client-side GUI Applications: Using PHP-GTK, we can write full-blown, cross-platform GUI applications in PHP.
Features of PHP Scripting Language:
PHP runs on all major OS, from UNIX variants including Linux, FreeBSD, and Solaris to Windows and MAC OS X. It can be used with all leading web servers, including Apache, Microsoft IIS, and the Netscape / iPlanet servers.
The language is very flexible, i.e., we can generate the output from a PHP file in various formats such as PDF, GIF, JPG, and PNG images and Flash movies.
One of PHP’s most significant features is its wide-ranging support for databases. PHP supports all major databases, which include MySQL, PostgreSQL, Oracle, Sybase and ODBC-compliant databases. With PHP, creating web pages with dynamic content from a database is remarkably simple.
Finally, PHP provides a library of PHP code to perform common tasks, such as database abstraction, error handling and so on, with the PHP Extension and Application Repository (PEAR). PEAR is a framework and distribution system for reusable PHP components.
A Brief History of PHP:
PHP was written in the C programming language by Rasmus Lerdorf in 1994 for use in monitoring his online resume and related personal information. For this reason, PHP originally stood for "Personal Home Page". The first version used by others was available sometime in early 1995 and was known as the Personal Home Page Tools. It consisted of a very simplistic parser engine that only understood a few special macros and a number of utilities that were in common use on home pages back then. A guestbook, a counter and some other stuff.
The parser was rewritten in mid-1995 and named PHP/FI Version 2. Lerdorf combined PHP with his own Form Interpreter (FI), releasing the combination publicly as PHP/FI (generally referred to as PHP 2.0) on June 8, 1995. By mid-1997, PHP version 2 had grown quite a bit and had attracted lot of users, but there were still some stability problems with the underlying parsing engine.
The project was still mostly a one-man effort, with a few contributions here and there. At this point, Zeev Zuraski and Andi Gutmans in Tel Aviv volunteered to rewrite the underlying parsing engine, which was considered as the base for PHP version 3. Other people also volunteered to work on other parts of PHP, and the project changed from a one-person effort with a few contributors to a true Open Source Project with many developers around the world. Thus PHP 3.0 was developed and released in June 1998.
PHP 3 was the first widely used version of PHP. After the release of PHP 3, usage really started to take off. Then Version 4 was prompted by a number of developers who were interested in making some fundamental changes to the architecture of PHP. These changes included the following:
  1. Abstracting the layer between the language and the web server
  2. Adding a thread-safety mechanism
  3. Adding a more advanced, two-stage parse/execute tag-parsing system
PHP 4 was released in May 2000, with a new core, known as the Zend Engine 1.0. This new parser, primarily written by Zeev and Andi, was named Zend engine. PHP 4 featured improved speed and reliability over PHP 3. In terms of features, PHP 4 added references, the Boolean type, COM support on Windows, output buffering, many new array functions, expanded object-oriented programming, inclusion of the PCRE library, and more. Maintenance releases of PHP 4 are still available, primarily for security updates.
PHP 5 was released in July 2004, with the updated Zend Engine 2.0. The core PHP language (Version 5+) features the following:
  1. Provides powerful string- and array- handling facilities
  2. Provides improved support for object-oriented programming
  3. Provides extension modules, through which a PHP application can interact with a database such as MySQL or Oracle, draw graphs, create PDF files, and parse XML files.
  4. Allows a programmer to create his own PHP extension modules in a programming language like C, to provide a PHP interface to the functions in an existing code library.
  5. Allows PHP to run on Windows, which lets the programmer to have control over Windows applications such as Word or Excel with COM or interact with databases using ODBC.

One Response so far

  1. Innofied says:

    Hi,

    Recently I came across some great articles on your site.
    The other day, I was discussing ()with my colleagues and they suggested I submit an article of my own. Your site is just perfect for what I have written!
    Would it be ok to submit the article? It is free of charge, of course!

    Let me know what you think
    Contact me at anelieivanova@gmail.com

    Regards
    Anele Ivanova

Leave a Reply