<?php
// This is a PHP program that creates different variables
$var1 = "Hello, World!"; // A string variable
$var2 = 42; // An integer variable
$var3 = 3.14; // A float variable
$var4 = true; // A boolean variable
$var5 = null; // A null variable
// Print the values of the variables to the screen
echo $var1 . "<br>";
echo $var2 . "<br>";
echo $var3 . "<br>";
echo $var4 . "<br>";
echo $var5 . "<br>";
?>
Hello, World!
42
3.14
1
$var1
` is a string variable that contains the value "Hello, World!".$var2
` is an integer variable that contains the value 42.$var3
` is a float variable that contains the value 3.14.$var4
` is a boolean variable that contains the value true.$var5
` is a null variable that has no value assigned to it.echo
` command. Note that the `<br>
` tag is used to add a line break after each value, which makes the output easier to read.$
`) followed by the variable name, and values can be assigned to variables using the assignment operator (`=
`).