For a better understanding of this example, we always recommend you to learn the basic topics of PHP programming listed below:
A string is a series of characters, where a character is the same as a byte. PHP supports a 256-character set and hence does not offer native Unicode support.
Php program to print hello world program is a computer program that emits or displays the message “Hello, World!” Such a program is fairly easy in most programming languages, and it is frequently used to teach a programming language’s basic grammar.
Note: As of PHP 7.0.0, there are no particular restrictions regarding the length of a string on 64-bit builds. On 32-bit builds and in earlier versions, a string can be as large as up to 2GB (2147483647 bytes maximum).
A string literal can be specified in four different ways:
STEP 1: Use the echo keyword to display the message.
<?php
echo "Hello World!"."\n";
echo "Tomorrow I \'ll learn PHP global variables."."\n";
echo "This is a bad command : del c:\\*.*"."\n";
?>
Hello World! Tomorrow I \'ll learn PHP global variables. This is a bad command : del c:\*.*