PHP was created by Rasmus Lerdorf in 1994 as a simple parser engine to keep track of who watched his resume. The first public version of PHP was available in 1995 and was called Personal Home Page Tools and was mainly used for home pages. Todays PHP version appeared in the end of 1999.
PHP was designed for server side scripting which means no code is located on the client computer. It is used in a web based environment. Web server needs to support PHP and then it transforms source code into HTML for a web browser.
According to W3Techs 78.8% of all websites are using PHP for their server-side. Despite the fact some people consider PHP not a language it still has many advantages such as it is open source, most web servers support it, exchange server files to databases, encrypt data, manage cookies and collect form data.
In conclusion, PHP is a server side languauge used in static and dynamic websites and web applications. It is located on the server and is sent to web pages when needed.