π Start
Ripple is a high-performance native PHP coroutine engine based on the fiber feature of PHP8.1+ + Revolt tool library. Its original design intention is
Extend PHP features with PHP features
<?php
include 'vendor/autoload.php';
$task = static function ($i) {
\Co\sleep(1);
echo 'Coroutine ', $i, \PHP_EOL;
};
for ($i = 0; $i < 100; $i++) {
\Co\async(static fn ()=> $task($i));
}
// Wait for all coroutines to complete execution
\Co\sleep(2);
It doesn't replace anything or impose new constraints but simply provides a solution:
Provides a series of standard APIs and tools, providing a reliable support library for the PHP-CLI mode, allowing developers to easily build high-performance PHP service mode applications