📁 File Manager Pro
v10.0.2 | PHP: 8.1.34
Server: LiteSpeed
2026-06-29 18:13:39
📂
/
/
opt
/
alt
/
tests
/
alt-php85-pecl-zmq_1.1.3-2.84f0720.el8
/
tests
✏️
Editing: 009-ispersistent.phpt
--TEST-- Test ispersistent on context and socket --SKIPIF-- <?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> --FILE-- <?php /* Persistent context */ $context = new ZMQContext(); $socket = $context->getSocket(ZMQ::SOCKET_REQ, 'persistentId'); $socket2 = $context->getSocket(ZMQ::SOCKET_REQ, null); var_dump($context->isPersistent(), $socket->isPersistent(), $socket->getPersistentId(), $socket2->isPersistent(), $socket2->getPersistentId()); /* Non-persistent context */ $context = new ZMQContext(1, false); $socket = $context->getSocket(ZMQ::SOCKET_REQ, 'persistentId'); $socket2 = $context->getSocket(ZMQ::SOCKET_REQ, null); var_dump($context->isPersistent(), $socket->isPersistent(), $socket->getPersistentId(), $socket2->isPersistent(), $socket2->getPersistentId()); --EXPECTF-- bool(true) bool(true) string(12) "persistentId" bool(false) NULL bool(false) bool(false) NULL bool(false) NULL
💾 Save Changes
❌ Cancel