$str
and $str1
are both arrays, one will report an error when called, and the other will not
<code><?php $str[] = 'calback_func'; $str1 = ['calback_func']; //$str[0] 改成 $str1[0] 就会报错 $process = new swoole_process($str[0]); $pid = $process->start(); function calback_func(swoole_process $worker){// 第一个处理 echo $worker->callback .PHP_EOL; }</code>
#
Error code$str
and $str1
are both arrays, one will report an error when called, and the other will not
<code><?php $str[] = 'calback_func'; $str1 = ['calback_func']; //$str[0] 改成 $str1[0] 就会报错 $process = new swoole_process($str[0]); $pid = $process->start(); function calback_func(swoole_process $worker){// 第一个处理 echo $worker->callback .PHP_EOL; }</code>
#
Error code