付给变量后出错 function
$func = function(){ echo 'this is a test'; }; echo $func(); 把它付给变量后,function会出错 为啥??? Catchable fatal error: Object of class Closure could not be converted to string in D:\phpStudy\WWW\php1\2.php on line 31
$func = function(){ echo 'this is a test'; }; echo $func(); 把它付给变量后,function会出错 为啥??? Catchable fatal error: Object of class Closure could not be converted to string in D:\phpStudy\WWW\php1\2.php on line 31
2017-06-08
举报