Annotation of embedaddon/php/Zend/tests/ns_028.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: 028: Name ambiguity (class name & external namespace name)
3: --FILE--
4: <?php
5: require "ns_028.inc";
6:
7: class 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;
17: Foo\Bar();
18: $x = new Foo\Foo;
19: Foo\Foo::Bar();
20: \Foo\Bar();
21: --EXPECT--
22: Method - Foo::__construct
23: Func - Foo\Bar
24: Method - Foo\Foo::__construct
25: Method - Foo\Foo::Bar
26: Func - Foo\Bar
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>