2013-09-29 23:58:25 +08:00
|
|
|
--TEST--
|
|
|
|
Bug #65322: compile time errors won't trigger auto loading
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
|
|
|
spl_autoload_register(function($class) {
|
|
|
|
var_dump($class);
|
2015-03-15 16:47:25 +08:00
|
|
|
class X {}
|
2013-09-29 23:58:25 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
set_error_handler(function($_, $msg, $file) {
|
|
|
|
var_dump($msg, $file);
|
2015-03-15 16:47:25 +08:00
|
|
|
new X;
|
2013-09-29 23:58:25 +08:00
|
|
|
});
|
|
|
|
|
2015-03-31 22:10:22 +08:00
|
|
|
/* This is just a particular example of a non-fatal compile-time error
|
|
|
|
* If this breaks in future, just find another example and use it instead */
|
2015-03-15 16:47:25 +08:00
|
|
|
eval('class A { function test() { } } class B extends A { function test($a) { } }');
|
2013-09-29 23:58:25 +08:00
|
|
|
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
2015-06-29 06:28:52 +08:00
|
|
|
string(62) "Declaration of B::test($a) should be compatible with A::test()"
|
2013-09-29 23:58:25 +08:00
|
|
|
string(%d) "%s(%d) : eval()'d code"
|
2015-03-15 16:47:25 +08:00
|
|
|
string(1) "X"
|