<?php
function funcRef($func){
return create_function('', "return call_user_func_array('{$func}', func_get_args());"); }
function foo($a, $b, $c){
return sprintf("A:%s B:%s C:%s", $a, $b, $c); }
$b = funcRef("foo");
echo $b("hello", "world", 123);
//=> A:hello B:world C:123
PD9waHAKCmZ1bmN0aW9uIGZ1bmNSZWYoJGZ1bmMpewogIHJldHVybiBjcmVhdGVfZnVuY3Rpb24oJycsICJyZXR1cm4gY2FsbF91c2VyX2Z1bmNfYXJyYXkoJ3skZnVuY30nLCBmdW5jX2dldF9hcmdzKCkpOyIpOwp9CgpmdW5jdGlvbiBmb28oJGEsICRiLCAkYyl7CiAgICByZXR1cm4gc3ByaW50ZigiQTolcyBCOiVzIEM6JXMiLCAkYSwgJGIsICRjKTsKfQoKJGIgPSBmdW5jUmVmKCJmb28iKTsKCmVjaG8gJGIoImhlbGxvIiwgIndvcmxkIiwgMTIzKTsKCi8vPT4gQTpoZWxsbyBCOndvcmxkIEM6MTIz