What is PHP?

PHP is a programming language. It’s a pretty widely used language and can be embedded into HTML. PHP is a server-side language. When a user requests a web page that contains PHP code, the code is processed by the PHP module installed on that web server. The PHP pre-processor then generates HTML output to be displayed on the user’s browser screen.

Example of a simple PHP code:

<?php
	echo "Hello, World!";
?>

PHP files usually have a .php extension. PHP can be used inside HTML documents. The PHP pre-processor only processes code inside the php opening tag <?php and the closing tag ?>.

Example of PHP code inside an HTML document:

<html>
	<head>
		<title><?php bloginfo('name'); ?></title> 
	</head>