xref: /PHP-5.5/Zend/tests/ns_012.phpt (revision 610c7fbe)
1--TEST--
2012: Import in namespace and functions
3--FILE--
4<?php
5namespace test\ns1;
6
7function foo() {
8  echo __FUNCTION__,"\n";
9}
10
11use test\ns1 as ns2;
12use test as ns3;
13
14foo();
15bar();
16\test\ns1\foo();
17\test\ns1\bar();
18ns2\foo();
19ns2\bar();
20ns3\ns1\foo();
21ns3\ns1\bar();
22
23function bar() {
24  echo __FUNCTION__,"\n";
25}
26
27--EXPECT--
28test\ns1\foo
29test\ns1\bar
30test\ns1\foo
31test\ns1\bar
32test\ns1\foo
33test\ns1\bar
34test\ns1\foo
35test\ns1\bar
36