付給變量后出錯 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
舉報
2021-06-03
PHP版本的問題
PHP版本過低
2017-07-25
setInterv('changeColor()',300);
2017-06-15
你發的這段是沒有問題的,錯誤行數在31行,恕我直言,你沒動腦子
2017-06-13
這段沒有問題。