四、(一)請說明下列二個 PHP 程式的輸出結果。(8 分)
1.
<!DOCTYPE html>
<html>
<body>
<?php
$i = 1;
while ($i < 6) {
if($i == 3) break;
echo $i;
$i++;
}
?>
</body>
</html>
2.
<!DOCTYPE html>
<html>
<body>
<?php
$x = 5;
function myTest() {
echo "<p>Variable x inside function is: $x</p>";
}
myTest();
echo "<p>Variable x outside function is: $x</p>";
?>
</body>
</html>