mirror of
https://github.com/php/php-src.git
synced 2024-12-05 07:46:06 +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.
23 lines
449 B
PHP
23 lines
449 B
PHP
--TEST--
|
|
Bug #65322: compile time errors won't trigger auto loading
|
|
--FILE--
|
|
<?php
|
|
|
|
spl_autoload_register(function($class) {
|
|
var_dump($class);
|
|
class B {}
|
|
});
|
|
|
|
set_error_handler(function($_, $msg, $file) {
|
|
var_dump($msg, $file);
|
|
new B;
|
|
});
|
|
|
|
eval('class A { function a() {} function __construct() {} }');
|
|
|
|
?>
|
|
--EXPECTF--
|
|
string(50) "Redefining already defined constructor for class A"
|
|
string(%d) "%s(%d) : eval()'d code"
|
|
string(1) "B"
|