<?php function myfunc(){ return 'works'; } define('func', 'myfunc'); (func)(); // Error: function "func" not defined $tokens = token_get_all('<?php function myfunc(){ echo \'works\'; } define(\'func\', \'myfunc\'); (func)();'); foreach ($tokens as $token) { if (is_array($token)) { echo "Line {$token[2]}: ", token_name($token[0]), " ('{$token[1]}')", PHP_EOL; } }
You have javascript disabled. You will not be able to edit any code.