Skip to main content

All Questions

Filter by
Sorted by
Tagged with
3 votes
2 answers
53 views

Is there a formal term for functions that have static state across executions?

Two examples, one in PHP: function adder($i){ static $a = 0; $a += $i; return $a; } A similar effect can be achieved with closures in javascript: ...
Kit Sunde's user avatar
  • 131