What will be the output of the following PHP code ?
<?php
function fun()
{
$x = 0;
echo $x;
$x++;
}
fun();
fun();
fun();
?>
<?php
function fun()
{
$x = 0;
echo $x;
$x++;
}
fun();
fun();
fun();
?>
A. 012
B. 123
C. 000
D. 111
Answer: Option C

Join The Discussion