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
Easy to learn
Large community of users and developers
Offers a large number available extensions and source codes
Allows execution of code in restricted environments
offers native session management and extension API
A great alternate to competitors
Can be deployed on most web servers
Works on almost every operating system and platform
Disadvantages of PHP
Not suitable for making desktop applications
Error handling is traditionally 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
Generally considered to be less secured than the other programming languages