Skip to content

Instantly share code, notes, and snippets.

@niklasvh
Created July 24, 2012 17:30
Show Gist options
  • Save niklasvh/3171359 to your computer and use it in GitHub Desktop.
Save niklasvh/3171359 to your computer and use it in GitHub Desktop.
<?php
$func = create_function('','
static $foo = 0;
return $foo++;
');
var_dump($func());
var_dump($func());
var_dump($func());
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment