PHP is a popular general-purpose scripting language that is especially suited to web development.
PHP (recursive acronym for PHP: Hypertext Preprocessor ) is a widely-used open source general-purpose scripting language
that is especially suited for web development and can be embedded into HTML.
The PHP code is enclosed in special start and end processing instructions
denoted by <?PHP and ?> that allow you to jump into and out of "PHP mode."
What distinguishes PHP from something like client-side JavaScript is that the code is executed on the server, generating HTML which is then sent to the client. The client would receive the results of running that script, but would not know what the underlying code was. You can even configure your web server to process all your HTML files with PHP, and then there's really no way that users can tell what you have up your sleeve.
There are three main areas where PHP scripts are used.
As has been the customary since ages, we start learning every new programming language with
classic "Hello World" example, so here comes the same in PHP:
<?PHP
echo 'Hello world' . nl2br(PHP_EOL); // prints 'Hello World' on stdout or web page - and cursor moves to next line
echo 'Greetings from PHP!' . '<BR>';
?>