📁 File Manager Pro
v10.0.2 | PHP: 8.1.34
Server: LiteSpeed
2026-06-29 17:56:22
📂
/
/
opt
/
alt
/
tests
/
alt-php84-pecl-zmq_1.1.3-1.84f0720.el8
/
tests
✏️
Editing: 050-sharedcontext.phpt
--TEST-- Test shared context --SKIPIF-- <?php require_once(dirname(__FILE__) . '/skipif.inc'); if (!in_array ('acquire', get_class_methods ('ZMQContext'))) die ('skip'); ?> --FILE-- <?php include dirname(__FILE__) . '/zeromq_test_helper.inc'; $context = ZMQContext::acquire(); $socket1 = new ZMQSocket($context, ZMQ::SOCKET_REP); $socket2 = ZMQContext::acquire()->getSocket(ZMQ::SOCKET_REQ, 'persistent id'); $dsn = uniqid("inproc://shared-ctx-"); $socket1->bind ($dsn); $socket2->connect ($dsn); $socket2->send("hello"); var_dump($socket1->recv()); var_dump ($context->isPersistent()); var_dump ($context->getSocketCount()); echo "OK"; --EXPECT-- string(5) "hello" bool(true) int(2) OK
💾 Save Changes
❌ Cancel