Skip to content
Quiz · Functions · lesson 9 of 11

Quiz — what a function sees

Question 1 of 3

What does the program print?

PHP
<?php

function nextId()
{
    static $id = 0;
    $id++;
    return $id;
}

echo nextId(), nextId(), nextId(), "\n";