Why did you fail to use the swoole_process callback class method in laravel's custom command line program?

help me: I use swoole_process in laravel"s artisan command program. When you create a process and use [$this, "functionName"] as a callback function, you can see why the execution failed. See the error in the picture that this method does not exist. Swoole"s official demo is all used as a callback function in the form of closures, but it can be run by using class methods as callbacks, and colleagues" demo can run normally.
ask for guidance.

Aug.27,2021
The reason for

is found, because my callback function is accidentally written as protected, which will cause the callback to fail.

Menu