<!DOCTYPE html>
<html>
<body>
<?php
$t;
function myCalculations () {
$x=22;
echo "<p>Test variable oustide of function:</p>";
echo "variable x is: $x";
echo "<br>";
echo "variable t is: $t";
}// Code will only display x
myCalculations();
echo "<p>Test variable inside of function:</p>";
echo "variable x is: $x";
echo "<br>";
echo "variable t is: $t";
?>//Code will only display t
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<p>Test variable oustide of function:</p>variable x is: 22<br>
Warning: Undefined variable $t in /in/Q3FVV on line 11
variable t is: <p>Test variable inside of function:</p>
Warning: Undefined variable $x in /in/Q3FVV on line 15
variable x is: <br>
Warning: Undefined variable $t in /in/Q3FVV on line 17
variable t is: //Code will only display t
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<p>Test variable oustide of function:</p>variable x is: 22<br>
Notice: Undefined variable: t in /in/Q3FVV on line 11
variable t is: <p>Test variable inside of function:</p>
Notice: Undefined variable: x in /in/Q3FVV on line 15
variable x is: <br>
Notice: Undefined variable: t in /in/Q3FVV on line 17
variable t is: //Code will only display t
</body>
</html>
Output for 7.3.32 - 7.3.33
<!DOCTYPE html>
<html>
<body>
<p>Test variable oustide of function:</p>variable x is: 22<br>variable t is: <p>Test variable inside of function:</p>variable x is: <br>variable t is: //Code will only display t
</body>
</html>
Output for 5.0.4 - 5.0.5
<!DOCTYPE html>
<html>
<body>
Notice: Undefined variable: t in /in/Q3FVV on line 5
<p>Test variable oustide of function:</p>variable x is: 22<br>
Notice: Undefined variable: t in /in/Q3FVV on line 11
variable t is: <p>Test variable inside of function:</p>
Notice: Undefined variable: x in /in/Q3FVV on line 15
variable x is: <br>
Notice: Undefined variable: t in /in/Q3FVV on line 17
variable t is: //Code will only display t
</body>
</html>
<!DOCTYPE html>
<html>
<body>
Notice: Undefined variable: t in /in/Q3FVV on line 5
<p>Test variable oustide of function:</p>variable x is: 22<br>
Notice: Undefined variable: t in /in/Q3FVV on line 11
variable t is: <p>Test variable inside of function:</p>
Notice: Undefined variable: x in /in/Q3FVV on line 15
variable x is: <br>
Notice: Undefined variable: t in /in/Q3FVV on line 17
variable t is: //Code will only display t
</body>
</html>