I am trying to write some nested functions of anonymous PHP, the structure is the one you see below, and my question is: how can I make it work without errors?
$abc = function($code){ $function_A = function($code){ return $code; }; $function_B = function($code){ global $function_A; $text = $function_A($code); return $text; }; $function_B($code); }; echo $abc('abc');
Exit Fatal error: function name must be a string in this line:
$text = $function_A($code);
This post doesn't tell me anything :(
source share