summaryrefslogtreecommitdiff
path: root/Zend/tests/use_unlinked_class.phpt
blob: e85f97821fcde0773f248b90eb7262492ac3e73d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--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
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