I need to be able to call a function, but the function name is stored in a variable, is this possible? e.g:
function foo () { //code here } function bar () {
A few years late, but this is the best manner now imho:
$x = (new ReflectionFunction("foo"))->getClosure(); $x();