dis-bench / src /php /php-src /Zend /tests /fibers /error-reporting.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
570 Bytes
--TEST--
Error reporting change reflected inside fiber
--FILE--
<?php
error_reporting(E_ALL & ~E_USER_NOTICE);
$fiber = new Fiber(function (): void {
trigger_error("Notice A", E_USER_NOTICE); // Should be silenced.
Fiber::suspend();
trigger_error("Warning A", E_USER_WARNING);
});
$fiber->start();
trigger_error("Notice B", E_USER_NOTICE); // Should be silenced.
$fiber->resume();
trigger_error("Warning B", E_USER_WARNING);
?>
--EXPECTF--
Warning: Warning A in %serror-reporting.php on line %d
Warning: Warning B in %serror-reporting.php on line %d