mirror of
https://github.com/php/php-src.git
synced 2024-12-20 15:30:38 +08:00
24 lines
325 B
PHP
24 lines
325 B
PHP
--TEST--
|
|
060: multiple namespaces per file
|
|
--FILE--
|
|
<?php
|
|
namespace Foo;
|
|
use Bar\A as B;
|
|
class A {}
|
|
$a = new B;
|
|
$b = new A;
|
|
echo get_class($a)."\n";
|
|
echo get_class($b)."\n";
|
|
namespace Bar;
|
|
use Foo\A as B;
|
|
$a = new B;
|
|
$b = new A;
|
|
echo get_class($a)."\n";
|
|
echo get_class($b)."\n";
|
|
class A {}
|
|
--EXPECT--
|
|
Bar\A
|
|
Foo\A
|
|
Foo\A
|
|
Bar\A
|