<?php function test() { $var = 1; $inc = function($num) use ($var) { ++$var; return $num + $var; }; return $inc(); } $test = test(); var_dump($test); echo $test(5); echo $test(6);
You have javascript disabled. You will not be able to edit any code.