<?php include "squirrel.class.php"; $smq = new Squirrel('127.0.0.1', 6061); $popget = $smq->pop_head(); echo "The SquirrelMQ header is: {$popget}\r\n"; $poptail = $smq->pop_tail(); echo "The Tail is: {$poptail}\r\n";
<?php include 'squirrel.class.php'; $squirrel = new Squirrel(); $start = time(); for ($i = 0; $i < 10000; $i++) { $squirrel->push_tail("-->NO number[{$i}] record"); } $end = time(); echo $end - $start;
<?php $pos = 2; include "squirrel.class.php"; $smq = new Squirrel('127.0.0.1', 6061); $popget = $smq->get_head(); echo "The SquirrelMQ head is: {$popget}\r\n";
<?php include 'squirrel.class.php'; $squirrel = new Squirrel(); $tmp = NULL; $start = time(); for ($i = 0; $i < 100000; $i++) { $tmp = $squirrel->pop_head(); # print $tmp; # $size = $squirrel->size(); # if ($size == 0 ) exit; } $end = time(); echo $end - $start;
<?php include 'squirrel.class.php'; $squirrel = new Squirrel(); $start = time(); for ($i = 0; $i < 100000; $i++) { $squirrel->push_tail("This is SquirrelMQ TEST, This is number[{$i}] record."); } $end = time(); echo $end - $start;
<?php include "squirrel.class.php"; $smq = new Squirrel('127.0.0.1', 6061); $smq->push_tail("www.thislinux.com");
<?php include "squirrel.class.php"; $smq = new Squirrel('127.0.0.1', 6061); $size = $smq->size(); echo "The SquirrelMQ size: {$size}";
<?php include "squirrel.class.php"; $smq = new Squirrel('127.0.0.1', 6061); $smq->push_tail("INSERT INTO mytable(uid, username, password)VALUES(NULL, 'liexusong', '123456');"); // test