实际开发中需要用到 PHP 类似队列的功能 于是乎 写了下面的类 写的比较仓卒 有BUG 欢迎Email 我,学习交流仅供参考。
/**
* PHP Class for queue
* @author yangqijun@live.cn
* @copyright DataFrog Beijingbei Ltd. 2011-07-25
*/
class Queue {
public $length=12;
public $queue = array(); // if String like this "22,23,24" convert to array to do queue
public $delimiter=',';
function __construct($queue=array())
{
$this->queue=$queue;
}
......
阅读全文