summaryrefslogtreecommitdiff
path: root/Zend/tests/class_alias_016.phpt
blob: 930f2ee0e4ad40cb4587d8cab8ebcd71454e43f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--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: Class 'foo\foo' not found in %s on line %d