Init Repo

This commit is contained in:
root
2019-09-06 23:53:10 +08:00
commit f0ef89dfbb
7905 changed files with 914138 additions and 0 deletions

14
vendor/swoole/examples/ringqueue.php vendored Executable file
View File

@ -0,0 +1,14 @@
<?php
$q = new Swoole\RingQueue(10);
for ($i = 0; $i < 12; $i++)
{
$ret = $q->push("hello_" . $i);
var_dump($ret, $q->isFull(), $q->count());
}
for ($i = 0; $i < 12; $i++)
{
$ret = $q->pop();
var_dump($ret, $q->isEmpty(), $q->count());
}