What is PHP ?


What is PHP ?

What is PHP, a tutorial which gives you a small introduction to PHP language.

What is PHP, a tutorial which gives you a small introduction to PHP language.

What is PHP?

PHP is an acronym stand for Hypertext PreProcessor. It is an open source scripting language which is used for web development and can be embedded in HTML. PHP is free, efficient, and that's why it is very popular in web development scenario.

PHP coding is enclosed within <?php   ?> tag. The page originates as PHP code on the server but is transformed into HTML code before sending along to the PHP code and converts it into HTML code.

Brief History of PHP Programming Language

The development process of PHP was started in 1994 as a set of Common Gateway Interface binaries written in 'C'-language by Rasmus Lerdorf.  It was released publicly on June 8, 1995. The variables, form handling process, and the ability to embed HTML coding is much like Perl.

Two developers from Technion IIT of Israel, Zeev Suraski and Andi Gutmans rewrote the parser in 1997 and laid the base of PHP 3. The official launch of PHP 3 came in June 1998. Suraski and Gutmans then started a new rewrite of PHP's core, producing the Zend Engine in 1999.

PHP 4 was released on May 22, 2004, it was powered by Zend engine 1.0. Then PHP 5 was released on July 13, 2004 powered by the new Zend Engine II. PHP 5 included better support for OOP and other enhancements. Late static binding was included in PHP 5.3. PHP 6 is under developed and it will be released soon, it will remove many functions which are present in PHP 5.3 and if any user wiill try to use those functions then a warning message will be generated. 


From PHP 4 onwards, the PHP parser compiles input and produce bytecode for processing by the Zend engine. It is one of the popular server-side applications like: Microsoft's C# - Visual Basic.NET - ASP family, Sun's Java - JSP, Macromedia's ColdFusion, CGI - Perl. PHP also attracted many frameworks like: CakePHP, Symfony, CodeIgniter, and Zend framework.

Main architectures of PHP are

  • LAMP: Linux, Apache, MySQL, and PHP ( or Perl, Python)
  • WAMP: Windows, Apache, MySQL, and PHP ( or Perl, Python)

Many popular Websites are written in PHP like: Yahoo, Facebook, Youtube etc.


Different features in PHP

  1. PHP is open source, free to download and use 
  2. PHP is cross platform 
  3. PHP is compatible with any server 
  4. PHP supports popular databases 
  5. PHP is easy to learn 


Data types supported by PHP

Following data types are supported by PHP:

  • Integer
  • Double
  • String
  • Boolean
  • Array
  • Object

Required software 

 To run a PHP file we need following software:

 i) Web Server like Apache, IIS or any other popular web server

ii) PHP setup.

iii) Any Database like : MySQL, Oracle, PostgreSql etc.



ii) LAMP

OOP features in PHP Language

Basic OOP features were included in PHP 3 and improved in PHP 4. In PHP 5 many OOP based features are included like private, public member variables and methods, abstract class, final class, abstract method, final method, constructor, destructor, etc. Like any other OOP based programming language it included exception handling. PHP 5 introduces interfaces.