PHP is one of the most widely-used server-side scripting languages for creating dynamic web pages and web applications. Some of the most popular web applications including forums, e-commerce shopping applications, content management systems and blogging applications are developed using the PHP programming language. PHP is incredibly easy and simple to learn but has a huge array of features for the most complex applications you’d need to create. A few prominent examples of popular PHP applications include WordPress, being one of the largest blogging software used in the world; phpBB, a popular bulletin board software and Joomla, a popular content management system (CMS) developed in PHP (among others).
PHP originally started as a simple set of tools for web developers to be able to use in order to automate and simplify certain tasks. Although originally, Rasmus released PHP as the “Personal Home Page Tools”; and it had. very limited and basic functionality and were originally simply a set of Perl scripts for his personal website. However, later on he rewrote those Perl scripts as CGI binaries in the C language with more features including the ability to process form input and a few other things – and he had renamed the language toolkit to “Personal Home Page/Forms Interpreter”, commonly shortened at the time as “PHP/FI”. The first version of PHP/FI, version 1.0, did have some basic features that are still common to PHP today, including variables (that has syntax similar to that of Perl), dynamic form handling, and could (as it can today) have HTML embedded in the PHP file.
In 1997, Zeev and Andi, at Technion IIT (a public research university in Israel) rewrote the PHP parser, and PHP 3 came with some useful new features; one of which being basic support for object oriented programming – and until PHP 5, object oriented programming support in PHP wasn’t favourable in comparison to other languages; especially considering PHP 3 and PHP 4 essentially had partial support for all of the models in object oriented programiprogramming, such as visibility of methods and class-level properties/variables only being available since PHP version 5. Object oriented programming is a programming and development model in which code logic is separated into different methods and with features in object oriented programming such as inheritance, abstract classes and more; it can make application development easier especially for large-scale applications.
PHP 5 also introduced PHP Data Objects, a simple, object-oriented way to interact with database systems. It’s similarly an alternative to using the standard database functions such as mysql_query() for MySQL databases and pg_query() for PostgreSQL databases.
Interesting (and useful) features in PHP
Even though PHP is designed for the creation of web applications, it has plenty of interesting and useful features, including:
Dynamically creating images.
You can dynamically create images using PHP by simply writing PHP code. – images are drawn using the Graphics Draw (GD) library. An image is then rendered by PHP saved to the server.
You can compress files using PHP to various compression formats, including .zip, .rar and .bz2.
You can check the strength of passwords using built-in PHP functions – there is a cryptography extension Crack that allows you to test the strength of a password.