代码拉取完成,页面将自动刷新
<?php
/**
* Created by PhpStorm.
* User: inhere
* Date: 2017/5/29
* Time: 上午11:05
*/
use Inhere\Queue\QueueInterface;
require dirname(__DIR__) . '/../../autoload.php';
$q = \Inhere\Queue\Queue::make([
'driver' => 'sysv', // shm sysv php
'id' => 12,
'serializer' => 'serialize',
'deserializer' => 'unserialize',
]);
//var_dump($q);
echo "driver is: {$q->getDriver()}\n\n";
$r[] = $q->push('n1');
$r[] = $q->push('n2');
$r[] = $q->push(['n3-array-value']);
$r[] = $q->push('h1', QueueInterface::PRIORITY_HIGH);
$r[] = $q->push('l1', QueueInterface::PRIORITY_LOW);
$r[] = $q->push('n4');
//var_dump($r);
$i = 6;
while ($i--) {
var_dump($q->pop());
usleep(50000);
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。