xref: /PHP-8.3/Zend/tests/ns_027.phpt (revision 7aacc705)
1--TEST--
2027: Name ambiguity (class name & part of extertnal namespace name)
3--FILE--
4<?php
5require "ns_027.inc";
6
7class Foo {
8  function __construct() {
9    echo __CLASS__,"\n";
10  }
11  static function Bar() {
12    echo __CLASS__,"\n";
13  }
14}
15
16$x = new Foo;
17Foo::Bar();
18$x = new Foo\Bar\Foo;
19Foo\Bar\Foo::Bar();
20?>
21--EXPECT--
22Foo
23Foo
24Foo\Bar\Foo
25Foo\Bar\Foo
26