- Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.6
- Parse error: syntax error, unexpected '}', expecting ';' in /in/SBfFf on line 8
Process exited with code 255.
<?php
function closure() {
$a = 0;
return function () {
return $a++;
}
}
$c = closure();
var_dump($c());
var_dump($c());