diff options
Diffstat (limited to 'Zend/tests/class_alias_016.phpt')
-rw-r--r-- | Zend/tests/class_alias_016.phpt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Zend/tests/class_alias_016.phpt b/Zend/tests/class_alias_016.phpt new file mode 100644 index 0000000..930f2ee --- /dev/null +++ b/Zend/tests/class_alias_016.phpt @@ -0,0 +1,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 |