I've been going through w3schools trying to get to grips with php. I've done a little Java and C++ in the past but nothing web side. I can't figure out why I'm getting a parse error
<!DOCTYPE html>
<html>
<body>
<?php
// calling a variable can be done with $variable or . $Variable .
// php is loosely typed - you do not have to tell it that a var is a int or string etc
$color = "red"; //variables are case sensitive
echo "My car is " . $color . "<br>";
//scopes for vars are either local, global or static. Local are declared inside a function and global are declared outside a function
function myTest()
{
$x = 5; //local scope
echo "<p> Variable X inside function is: $x</p>;
}
?>
</body>
</html>
This returns a "Parse error: syntax error, unexpected end of file in C:\inetpub\wwwroot\phpinfo.php on line 28"
This runs fine with the function removed. What am I missing?