Discussion :: PHP - CS
-
What will be the output of the following PHP code ?
<?php
static $x = 0;
function fun()
{
echo $x;
$x++;
}
fun();
fun();
fun();
?>
Answer : Option C
Explanation :
Since variable x is not defined inside the function fun(), nothing will be printed.
Be The First To Comment