HTML output from web server

PHP may be used to feature content material to HTML files. While HTML is processed without delay by a web browser, PHP scripts are performed by an internet server and the ensuing HTML code is executed to the browser. The following HTML markup contains a PHP statement so one can upload Hello World! To the output:

HTML output from web server
<!DOCTYPE html>
<html>
 <head>
 <title>PHP!</title>
 </head>
 <body>
 <p><?php echo "Hello world!"; ?></p>
 </body>
</html>
When this is stored as a PHP script and accomplished by an internet server, the following HTML will be sent to the user’s browser:
<!DOCTYPE html>
<html>
 <head>
<title>PHP!</title>
 </head>
 <body>
 <p>Hello world!</p>
 </body>
</html>
Echo also has a shortcut syntax, which helps you to right now print a value. Prior to PHP 5.4.0, this short syntax only works with the short_open_tag configuration setting enabled.

For example, consider the following code:

<p><?= "Hello world!" ?></p>
Its output is same to the output of the following:
<p><?php echo "Hello world!"; ?></p>
In real-world applications, all data output via PHP to an HTML page need to be well escaped to prevent XSS (Cross-website scripting) attacks or text corruption.