PHP is currently one of the most common server-side scripting languages. It is very popular for developing web based software applications because programmers can use it easily to create web pages with dynamic content that interact with databases. The PHP source code is written by web developer and is processed on the web server, which dynamically generates HTML. The HTML, which contains the web page content, is then sent to the user's web browser. Therefore, the user should never see the actual PHP source code but only the web page.
PHP file is the source code of PHP language which contains text, HTML tags, and scripts. It is returned to the browser as plain HTML. Besides, PHP files always have filename extensions of “.php”, “.php4”, or “.php5.”