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 PHPFree softwareEasy to learnLarge community of users and developersOffers a large number available extensions and source codesAllows execution of code in restricted environmentsoffers native session management and extension APIA great alternate to competitorsCan be deployed on most web serversWorks on almost every operating system and platformDisadvantages of PHPNot suitable for making desktop applicationsError handling is traditionally poor Global configuration parameters can change language semantics, complicating deployment and portabilityObjects are Call By Value by default, which is the opposite of most languages and catches lots of programmers off-guardGenerally considered to be less secured than the other programming languages