xref: /PHP-7.3/Zend/tests/class_alias_016.phpt (revision e97d5fab)
1--TEST--
2Testing creation of alias to global scope
3--FILE--
4<?php
5
6namespace foo;
7
8class bar {
9}
10
11class_alias('foo\bar', 'foo');
12
13var_dump(new \foo);
14var_dump(new foo);
15
16?>
17--EXPECTF--
18object(foo\bar)#%d (0) {
19}
20
21Fatal error: Uncaught Error: Class 'foo\foo' not found in %s:%d
22Stack trace:
23#0 {main}
24  thrown in %s on line %d
25