Ai
1 Star 0 Fork 0

三仓库,镜像/php-amqp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
amqpqueue_get_channel.phpt 603 Bytes
一键复制 编辑 原始数据 按行查看 历史
--TEST--
AMQPQueue getChannel() test
--SKIPIF--
<?php if (!extension_loaded("amqp")) print "skip"; ?>
--FILE--
<?php
$cnn = new AMQPConnection();
$cnn->connect();
$ch = new AMQPChannel($cnn);
$ch2 = new AMQPChannel($cnn);
$q = new AMQPQueue($ch);
echo $ch === $q->getChannel() ? 'same' : 'not same', PHP_EOL;
echo $ch2 === $q->getChannel() ? 'same' : 'not same', PHP_EOL;
$old_prefetch = $ch->getPrefetchCount();
$new_prefetch = 999;
$q->getChannel()->setPrefetchCount($new_prefetch);
echo $ch->getPrefetchCount() == $new_prefetch ? 'by ref' : 'copy', PHP_EOL;
?>
--EXPECT--
same
not same
by ref
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/third-repo/php-amqp.git
git@gitee.com:third-repo/php-amqp.git
third-repo
php-amqp
php-amqp
master

搜索帮助