Skip to content

Instantly share code, notes, and snippets.

@ChaosPower
Created July 24, 2014 04:06
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ChaosPower/6cad419cd123fbe2ecae to your computer and use it in GitHub Desktop.
PHP: Variable as function
<?php
function call($f)
{
return $f();
}
function sample()
{
return 'sample called';
}
function makeCall()
{
return call('sample');
}
print makeCall();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment