mirror of
https://github.com/php/php-src.git
synced 2024-12-02 22:34:55 +08:00
d30cd7d7e7
Closes GH-5590
25 lines
326 B
PHP
25 lines
326 B
PHP
--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
|