mirror of
https://github.com/php/php-src.git
synced 2024-12-24 09:18:17 +08:00
f0c926564c
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.
19 lines
403 B
PHP
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
|