php-src/Zend/tests/class_alias_021.phpt
2008-05-12 17:57:21 +00:00

26 lines
325 B
PHP

--TEST--
Overriding internal class with class alias
--FILE--
<?php
namespace foo;
class bar { }
class_alias('foo::bar', 'baz');
use ::baz as stdClass;
var_dump(new foo::bar);
var_dump(new stdClass);
var_dump(new ::baz);
?>
--EXPECTF--
object(foo::bar)#%d (0) {
}
object(foo::bar)#%d (0) {
}
object(foo::bar)#%d (0) {
}