summaryrefslogtreecommitdiff
path: root/Zend/tests/class_alias_016.phpt
blob: 1d2b6752a46067eb4209518dfa64a4855bb94ec5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--TEST--
Testing creation of alias to global scope
--FILE--
<?php

namespace foo;

class bar {
}

class_alias('foo\bar', 'foo');

var_dump(new \foo);
var_dump(new foo);

?>
--EXPECTF--
object(foo\bar)#%d (0) {
}

Fatal error: Uncaught Error: Class 'foo\foo' not found in %s:%d
Stack trace:
#0 {main}
  thrown in %s on line %d