In: Computer Science
PHP is a recursive acronym for the “PHP: Hypertext Preprocessor”. This language is a widely used open source general purpose scripting language which is especially suited for web development and can be embedded into HTML.
Normally "Hello World!" is the first program most of the beginning programmers learn to write in any given language.
PHP program for printing "Hello World!"
We will use echo statement for printing
<? Php
// the letters inside the double quotes will be printed on the web page
echo "Hello World!"
?>
OUTPUT
Hello World!
In the above code, the first line clarifies that everything beyond the <?php tag, until the ?> tag, is a code written in PHP . The second line is a single line comment which tells the interpreter to ignore everything which occurs on that line to the right of the //. The third line causes the “Hello World!” to be printed (or echoed) to the web page. We must note that every statement in PHP is terminated with semicolon(;)