A
Q. What will be the output of the following code?
Code:
<?php
function track()
{
static $var = 0;
$var++;
echo $var;
}
track();
track();
track();
?>
function track()
{
static $var = 0;
$var++;
echo $var;
}
track();
track();
track();
?>
- Correct Answer - Option(D)
- Views: 21
- Filed under category PHP
- Hashtags:
Discusssion
Login to discuss.