?
What will be the output of the following PHP code ?
What will be the output of the following PHP code ?
<?php
$var = 10;
function one()
{
echo $var;
}
one();
?>
<?php
$var = 10;
function one()
{
echo $var;
}
one();
?>
Answer & Solution
Correct Answer:
Option
C
$var is not global and hence is not available for one().
Join the Discussion
Login to post a comment or share your explanation.
Login