Skip to content

Instantly share code, notes, and snippets.

Created April 24, 2012 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/2478057 to your computer and use it in GitHub Desktop.
Save anonymous/2478057 to your computer and use it in GitHub Desktop.
<?php
function staticReturn()
{
if(isset($static_user))
{
return $static_user;
}
$user = fetchUser();
static $static_user = $user;
return $static_user;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment