PHP - Functions
Consider this PHP code:
What is the output?
$val = 1;
function test() {
static $val = 0;
$val++;
echo $val . ' ';
}
test();
test();
echo $val;What is the output?
