Quiz · Functions · lesson 9 of 11
Quiz — what a function sees
Question 1 of 3
What does the program print?
<?php
function nextId()
{
static $id = 0;
$id++;
return $id;
}
echo nextId(), nextId(), nextId(), "\n";What does the program print?
<?php
function nextId()
{
static $id = 0;
$id++;
return $id;
}
echo nextId(), nextId(), nextId(), "\n";