summaryrefslogtreecommitdiff
path: root/Zend/tests/use_unlinked_class.phpt
blob: ed874ff101802d6ebc5010c99b0551742b3e332b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--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: During class fetch: 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} in %s on line %d