PHP, short for Hypertext Preprocessor, is a very popular programming language for developing websites and web based applications. It is an open source, object-oriented general purpose programming language and was essentially created for the web developers. PHP was originally developed by a Danish developer named Greenlander Rasmus Lerdorf. Subsequently it became an open source programming language.
Some people even interpret the acronym PHP as Personal Home Page. It is referred as a scripting language in the sense that when a browser requests for a PHP page from the server, the PHP codes in the page are interpreted by the server-side PHP interpreter (compiler) on the fly before the web server delivers the page to the requesting browser. This makes developing applications easy as the developer does not need to compile and re-compile the php programs, every time he/she makes changes to the scripts/codes. The PHP files are stored in source code form itself on the web server.
Further, since PHP has been specifically created for developing web based applications, certain essential features that are required to maintain state in the stateless web based transactions, can be quite easily implemented using sessions and cookies. Another major advantage of PHP is that it is a platform independent programming language. PHP codes can be developed on a windows platform and deployed on a unix/linux platform without making any changes. PHP servers are available that run along with IIS (on windows) and Apache (on Linux/Unix). PHP servers are also available for other operating systems such as Mac OS, RISC OS and others.
PHP works very well with MySQL database and several other types of databases including MS SQL, Oracle, Informix, and many others through the ODBC connectivity interface. Though, the most widely used combination for PHP is LAMP, short for - Linux Apache MySql PHP. All four of these, viz. Linux, Apache, PHP and MySQL, are open source software. Hence, PHP deployment costs nothing in terms of license cost. In fact the most prevalent and most affordable shared hosting plans available from various hosting providers are essentially setup with Apache web server, PHP server and MySQL database on a Linux operating system.
PHP also has the capability to communicate with applications running on other platforms and other servers through a variety of protocols such as SOAP, JSON, LDAP, IMAP, SNMP, NNTP, POP3, IMAP, SMTP, HTTP, COM, etc. You can also open raw network sockets and interact using any other protocol. PHP also has the capability to invoke Java objects and use them in php programs as PHP objects.
The tremendous capabilities of PHP can be appreciated from the fact that today there are several very complex internet based e-commerce and erp systems running on PHP.
Though PHP was primarily developed to operate as a server side scripting language, its use is not limited to that alone. Here are the three ways in which php can be deployed.
In conclusion, PHP is the language for building web applications.
Rajeev Kumar is the primary author of How2Lab. He is a B.Tech. from IIT Kanpur with several years of experience in IT education and Software development. He has taught a wide spectrum of people including fresh young talents, students of premier engineering colleges & management institutes, and IT professionals.
Rajeev has founded Computer Solutions & Web Services Worldwide. He has hands-on experience of building variety of websites and business applications, that include - SaaS based erp & e-commerce systems, and cloud deployed operations management software for health-care, manufacturing and other industries.