<!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/aR02v on line 11
Variable t is: <p>Test variable inside of function:</p>
Warning: Undefined variable $x in /in/aR02v on line 15
Variable x is: <br>
Warning: Undefined variable $t in /in/aR02v 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/aR02v on line 11
Variable t is: <p>Test variable inside of function:</p>
Notice: Undefined variable: x in /in/aR02v on line 15
Variable x is: <br>
Notice: Undefined variable: t in /in/aR02v 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/aR02v on line 5
<p>Test variable oustide of function:</p>Variable x is: 22<br>
Notice: Undefined variable: t in /in/aR02v on line 11
Variable t is: <p>Test variable inside of function:</p>
Notice: Undefined variable: x in /in/aR02v on line 15
Variable x is: <br>
Notice: Undefined variable: t in /in/aR02v on line 17
Variable t is: //Code will only display t
</body>
</html>
<!DOCTYPE html>
<html>
<body>
Notice: Undefined variable: t in /in/aR02v on line 5
<p>Test variable oustide of function:</p>Variable x is: 22<br>
Notice: Undefined variable: t in /in/aR02v on line 11
Variable t is: <p>Test variable inside of function:</p>
Notice: Undefined variable: x in /in/aR02v on line 15
Variable x is: <br>
Notice: Undefined variable: t in /in/aR02v on line 17
Variable t is: //Code will only display t
</body>
</html>