3
如何確定閉包被聲明的參數的數量,以便在閉包之外使用?例如:如何確定PHP中閉包/匿名函數的參數數量
$myClosure = function($arg1, $arg2, $arg3){
}
$numArgs = someMagicalFunction($myClosure);
echo("that closure expects $numArgs arguments");
是否有一些功能可以滿足我的需求?