PHP was created in 1994 by Rasmus Lerdorf as a simple set of Common Gateway Interface binaries that was written in C programming language. Lerdorf originally used PHP as a way to track the visits to his online resume.
There are three main uses for PHP the first and most popular being Server-side scripting. For this you need three things a PHP parser, a web server, and a web browser. The second most popular use for PHP is command line scripting. In this case, with the use of just a PHP parser, the PHP script can be executed without need for a web server or web browser. This use of the PHP script is normally used for simple text processing tasks such as task schedulers. The third and final most popular use for PHP is writing desktop applications. If someone using PHP has enough knowledge in it’s advanced features, such as PHP-GTK then they can develop client-side applications.
In terms of competitors PHP has two major one in the forms of Python and Ruby. Python is widely used and designed for programmers with a way to express their concepts with fewer lines of code the other languages. Ruby is an open source full-stack web application framework.
Advantages of PHP
Software is free
Can be learned relatively easy
Has a large community of users and developers
Offers a large number available extensions and source codes
Allows for the execution of code in restricted environments
Offers native session management and extension API
PHP is a great alternative to competitors
It can be used on most avalible web servers
Works on almost every operating system and platform
Disadvantages of PHP
Not suited for making desktop apps as other software
Error handling is rather poor
Global configuration parameters can change language semantics, complicating deployment and portability
Objects are Call By Value by default, which is the opposite of most languages and catches lots of programmers off-guard
Is considered by most to be less secured than the other programming languages