1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 17:52:16 +01:00
Files
archived-php-src/Zend/tests/bug33771.phpt
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

41 lines
611 B
PHP

--TEST--
Bug #33771 (error_reporting falls to 0 when @ was used inside try/catch block)
--FILE--
<?php
error_reporting(E_ALL | E_STRICT);
var_dump(error_reporting());
function make_exception()
{
throw new Exception();
}
function make_exception_and_change_err_reporting()
{
error_reporting(E_ALL & ~E_STRICT);
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(32767)
int(32767)
int(30719)
Done