xref: /PHP-8.3/Zend/tests/ns_078.phpt (revision 7aacc705)
1--TEST--
2002: Import - different syntaxes
3--FILE--
4<?php
5namespace test\ns1;
6
7class Foo {
8  static function bar() {
9    echo __CLASS__,"\n";
10  }
11}
12
13class Foo2 {
14  static function bar() {
15    echo __CLASS__,"\n";
16  }
17}
18
19namespace xyz;
20use test\ns1\Foo;
21use test\ns1\Foo as Bar;
22use \test\ns1\Foo2;
23use \test\ns1\Foo2 as Bar2;
24
25Foo::bar();
26Bar::bar();
27Foo2::bar();
28Bar2::bar();
29?>
30--EXPECT--
31test\ns1\Foo
32test\ns1\Foo
33test\ns1\Foo2
34test\ns1\Foo2
35