mirror of
https://github.com/php/php-src.git
synced 2024-12-22 00:10:16 +08:00
67b907f059
C:\> php -r "interface stdClass { }" Error: Cannot declare interface stdClass, because the name is already in use in Command Line Code on line 1
18 lines
295 B
PHP
18 lines
295 B
PHP
--TEST--
|
|
Trying to redeclare class name in global scope inside namespace
|
|
--FILE--
|
|
<?php
|
|
|
|
namespace foo;
|
|
|
|
|
|
class foo {
|
|
}
|
|
|
|
class_alias(__NAMESPACE__ .'\foo', 'foo');
|
|
class_alias('\foo', 'foo');
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Warning: Cannot declare class foo, because the name is already in use in %s on line %d
|