我嘗試在windows中使用swow發(fā)現(xiàn)無法運(yùn)行。有幾處報錯。
分別從靜態(tài)php和非靜態(tài)php測試。
啟用swow協(xié)程。
靜態(tài)php下載地址:
https://static-php-cli.fra1.digitaloceanspaces.com/static-php-cli/windows/spc-max/php-8.3.15-cli-win.zip
Warning: [Fatal error in R5] Uncaught TypeError: stream_poll_one(): supplied resource is not a valid stream resource in E:\workerman\api-v3\vendor\workerman\workerman\src\Events\Swow.php:192
Stack trace:
#0 E:\workerman\api-v3\vendor\workerman\workerman\src\Events\Swow.php(192): stream_poll_one(Resource id #365, 18)
#1 [internal function]: Workerman\Events\Swow->Workerman\Events\{closure}()
#2 {main}
Warning: [Fatal error in scheduler] Uncaught Error: Maximum call stack size of 212992 bytes (zend.max_allowed_stack_size - zend.reserved_stack_size) reached. Infinite recursion? in E:\workerman\api-v3\vendor\workerman\coroutine\src\Utils\DestructionWatcher.php:48
Stack trace:
#0 [internal function]: Workerman\Coroutine\Utils\DestructionWatcher->__destruct()
#1 {main}
thrown in E:\workerman\api-v3\vendor\workerman\coroutine\src\Utils\DestructionWatcher.php on line 48
windows 10
workerman: 5.1
webman: 2.1