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 */
|
2019-03-27 23:58:30 +08:00
|
|
|
eval('class A { private function __invoke() { } }');
|
2013-09-29 23:58:25 +08:00
|
|
|
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
2020-04-26 13:34:19 +08:00
|
|
|
string(%d) "The magic method A::__invoke() must have public visibility"
|
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"
|