A file with .php extension refers to open source programming language that is used to write server side scripts to be executed on the server. It is the most popular and powerful web-scripting language that is widely used for development of large-scale web applications. PHP is at the core of the biggest blogging system on the web i.e. WordPress and runs the largest social network Facebook. It runs on various platforms such as Windows, Linux, Unix, Mac OS X, etc. and is compatible with almost all servers used today i.e. Apache, IIS, etc. PHP supports wide range of databases including MySQL.
PHP File Format
A single PHP can contain text, CSS, HTML, JavaScript, and PHP code. PHP code is executed on the server, and the result is returned to the browser as plain HTML. PHP files can be opened with any text editor and edited in place, though applications like Adobe Dreamweaver, Eclipse PHP Development tools offer a convenient way to write and modify PHP code.
Syntax
A PHP script is executed on the server, and the plain HTML result is sent back to the browser. A PHP script starts with
Example
<!DOCTYPE html>
<html>
<body>
<h1>My first PHP page</h1>
<?php
echo "Hello World!";
?>
</body>
</html>