php-src/Zend/tests/bug29890.phpt
Nikita Popov 2f1f34952e Remove $errcontext argument to error handlers
I'm removing the argument entirely here, but we might want to change
this to passing null or and empty array instead, if the impact of
dropping it entirely turns out to be too large.

This was deprecated as part of https://wiki.php.net/rfc/deprecations_php_7_2
as a doc-only deprecation.
2019-02-05 14:12:10 +01:00

24 lines
406 B
PHP

--TEST--
Bug #29890 (crash if error handler fails)
--FILE--
<?php
function customErrorHandler($fErrNo,$fErrStr,$fErrFile,$fErrLine) {
echo "error :".$fErrStr."\n";
}
set_time_limit(5);
error_reporting(E_ALL);
set_error_handler("customErrorHandler");
define("TEST",2);
//should return a notice that the constant is already defined
define("TEST",3);
?>
--EXPECT--
error :Constant TEST already defined