- Output for 7.0.0 - 7.0.31, 7.1.0 - 7.1.21, 7.2.0 - 7.2.9
- Parse error: syntax error, unexpected '}', expecting ',' or ';' in /in/m58hh on line 8
Process exited with code 255.
<?php
$x=5; // globel scope
function myTest() {
// using x inside a function is generate an error
echo "<p> variable x inside function: $x</p>"
}
myTest();
?>