php-src/Zend/tests/errmsg_045.phpt
Nikita Popov f0c926564c Fix bug #65322: compile time errors won't trigger auto loading
Also fixes duplicate bugs #54054 and #42098.

Furthermore this fixes incorrect error messages thrown from code
running inside an error handler when a compilation is in progress.
The error file and line are now correctly associated with the
file/line of the executor, rather than the compiler.
2013-09-29 17:58:25 +02:00

19 lines
403 B
PHP

--TEST--
Error message in error handler during compilation
--FILE--
<?php
set_error_handler(function($_, $msg, $file) {
var_dump($msg, $file);
echo $undefined;
});
eval('class A { function a() {} function __construct() {} }');
?>
--EXPECTF--
string(50) "Redefining already defined constructor for class A"
string(%d) "%s(%d) : eval()'d code"
Notice: Undefined variable: undefined in %s on line %d