xref: /PHP-5.4/Zend/tests/ns_028.phpt (revision 610c7fbe)
1--TEST--
2028: Name ambiguity (class name & external namespace name)
3--FILE--
4<?php
5require "ns_028.inc";
6
7class Foo {
8  function __construct() {
9  	echo "Method - ".__CLASS__."::".__FUNCTION__."\n";
10  }
11  static function Bar() {
12  	echo "Method - ".__CLASS__."::".__FUNCTION__."\n";
13  }
14}
15
16$x = new Foo;
17Foo\Bar();
18$x = new Foo\Foo;
19Foo\Foo::Bar();
20\Foo\Bar();
21--EXPECT--
22Method - Foo::__construct
23Func   - Foo\Bar
24Method - Foo\Foo::__construct
25Method - Foo\Foo::Bar
26Func   - Foo\Bar
27