1.2.1198. Swoole¶
Swoole : Production-Grade Async programming Framework for PHP.
Swoole is an event-driven asynchronous & concurrent networking communication framework with high performance written only in C for PHP.
<?php
for($i = 0; $i < 100; $i++) {
Swoole\Coroutine::create(function() use ($i) {
$redis = new Swoole\Coroutine\Redis();
$res = $redis->connect('127.0.0.1', 6379);
$ret = $redis->incr('coroutine');
$redis->close();
if ($i == 50) {
Swoole\Coroutine::create(function() use ($i) {
$redis = new Swoole\Coroutine\Redis();
$res = $redis->connect('127.0.0.1', 6379);
$ret = $redis->set('coroutine_i', 50);
$redis->close();
});
}
});
}
?>
See also Swoole and Swoole src.
1.2.1198.1. Specs¶
Short name |
Extensions/Extswoole |
Rulesets |
|
Exakat since |
0.12.0 |
PHP Version |
All |
Severity |
|
Time To Fix |
|
Precision |
Very high |
Available in |