Scope Rooms · Level 3 of 7

The drawer that remembers

A function with one static variable and one normal variable, called three times.

<?phpfunction visit(): void{    static $count = 0;    $local = 0;    $count++;    $local++;    echo "count $count, local $local", PHP_EOL;}visit();visit();visit();

1. Predict the output

Tap the lines in the order you think they print.

  1. 1…
  2. 2…
  3. 3…