<?php
$txt = "PHP";
echo "I love $txt!";
?>
<!DOCTYPE html>
<html>
<body>
<?php
// This is a single-line comment
# This is also a single-line comment
?>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<?php
/*
This is a multiple-lines comment block
that spans over multiple
lines
*/
?>
</body>
</html>
<?php
echo(rand(10, 100));
?>
<?php
define("GREETING", "Welcome to W3Schools.com!");
echo GREETING;
?>
<!DOCTYPE html>
<html>
<body>
<?php
// case-insensitive constant name
define("GREETING", "Welcome to W3Schools.com!", true);
echo greeting;
?>
</body>
</html>