Viewing File: /opt/alt/tests/alt-php82-pecl-zmq_1.1.3-1.84f0720.el8/tests/020-exceptionincallback.phpt

--TEST--
Test throwing exception from callback
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

function this_throws($a, $b) 
{
	throw new Exception("Hello there");
}

try {
	$socket = new ZMQSocket(new ZMQContext(), ZMQ::SOCKET_REQ, 'persistent_socket', 'this_throws');
	echo "Fail\n";
} catch (Exception $e) {
	echo $e->getMessage() . "\n";
}

--EXPECTF--
Hello there

Back to Directory File Manager
<