1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/Zend/tests/error_reporting/bug33771.phpt
DanielEScherzer bce1f4aeb1 Zend/tests: organize some tests with sub directories (3) (#16444)
First pass at moving `Zend/tests/bug*` tests to existing sub directories

Work towards GH-15631
2025-02-10 00:35:51 +00:00

41 lines
605 B
PHP

--TEST--
Bug #33771 (error_reporting falls to 0 when @ was used inside try/catch block)
--FILE--
<?php
error_reporting(E_ALL);
var_dump(error_reporting());
function make_exception()
{
throw new Exception();
}
function make_exception_and_change_err_reporting()
{
error_reporting(E_ALL & ~E_NOTICE);
throw new Exception();
}
try {
@make_exception();
} catch (Exception $e) {}
var_dump(error_reporting());
try {
@make_exception_and_change_err_reporting();
} catch (Exception $e) {}
var_dump(error_reporting());
echo "Done\n";
?>
--EXPECT--
int(30719)
int(30719)
int(30711)
Done