The docs frequently state the use of OpenSwoole\Coroutine::run. See https://openswoole.com/docs/modules/swoole-coroutine. Yet, I don't see it as part of this package. Is this an oversight? Are the docs just out of date for v22? The function runs in PHP, but is not part of autocomplete.
Similarly, the docs make use of \OpenSwoole\Process::name (example), which does not exist, but exists in this package.
echo phpversion('openswoole') . "\n";
$process = new \OpenSwoole\Process(function(\OpenSwoole\Process $worker){
echo "the pid of child process is " . $worker->pid . "\n";
echo "the file descriptor of pipe is " . $worker->pipe . "\n";
$res = $worker->write("Hello main process\n");
var_dump(strlen("Hello main process\n"));
var_dump($res);
$worker->name("php child process");
}, FALSE);
$process->start();
usleep(100);
echo $process->read();
Results in:
22.1.2
the pid of child process is 15932
the file descriptor of pipe is 5
Hello main process
int(19)
int(19)
Fatal error: Uncaught Error: Call to undefined method OpenSwoole\Process::name() in /var/www/myapp/src/Sandbox/src/Console/TestCommand.php:63
I have very minimal confidence in using this ide helper. Is there any other reference where we can see what the code is supposed to be? Otherwise, I am just guessing between this library, the documentation, and what actually runs from the installed PECL module.
The docs frequently state the use of OpenSwoole\Coroutine::run. See https://openswoole.com/docs/modules/swoole-coroutine. Yet, I don't see it as part of this package. Is this an oversight? Are the docs just out of date for v22? The function runs in PHP, but is not part of autocomplete.
Similarly, the docs make use of \OpenSwoole\Process::name (example), which does not exist, but exists in this package.
Results in:
I have very minimal confidence in using this ide helper. Is there any other reference where we can see what the code is supposed to be? Otherwise, I am just guessing between this library, the documentation, and what actually runs from the installed PECL module.