php-src/Zend/tests/use_unlinked_class.phpt

22 lines
452 B
Plaintext
Raw Normal View History

2019-05-22 09:13:28 +00:00
--TEST--
Classes can only be used once they are fully linked
--FILE--
<?php
spl_autoload_register(function($class) {
echo new ReflectionClass(A::class), "\n";
});
class A implements I {
}
?>
--EXPECTF--
Fatal error: Uncaught ReflectionException: Class A does not exist in %s:%d
2019-05-22 09:13:28 +00:00
Stack trace:
#0 %s(%d): ReflectionClass->__construct('A')
#1 [internal function]: {closure}('I')
#2 %s(%d): spl_autoload_call('I')
#3 {main}
thrown in %s on line %d