<!doctype html>
<?php
// Report all PHP errors (see changelog)
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$copyright1 = "&copy; 2017";
echo("<p>$copyright1</p>");
$copyright2 = htmlentities("&copy; 2017");
echo("<p>using htmlentities:  $copyright2</p>");
$myString = "Jim";
echo("<p>Hello\r\n \"$myString\"</p>\n");
echo('<p>Hello \n"$myString"</p>\n');
echo('<p>Hello \n"' . $myString . '"</p>\n');
$myNum = 1000 / 57;
echo("<p>$myNum</p>");
if (isset($_GET['id'])) {
  $parameter = $_GET['id'];
  echo("<p>$parameter</p>");
} else {
  echo("<p>No id</p>");
}
?>
<html>
<head>
<title>htmlentities()</title>
</head>
<body>
<a href="htmlentities.php" download="htmlentities.php">htmlentities.php</a>
</body>
</html> 