Skip to content

Instantly share code, notes, and snippets.

@Naktibalda
Forked from anonymous/gist:2478057
Created April 24, 2012 09:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Naktibalda/2478090 to your computer and use it in GitHub Desktop.
Save Naktibalda/2478090 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