xref: /PHP-8.2/Zend/tests/ns_084.phpt (revision f8d79582)
1--TEST--
2084: unbracketed namespace with nested bracketed namespace
3--FILE--
4<?php
5namespace foo;
6use \foo;
7class bar {
8    function __construct() {echo __METHOD__,"\n";}
9}
10new foo;
11new bar;
12namespace oops {
13class foo {
14    function __construct() {echo __METHOD__,"\n";}
15}
16use foo\bar as foo1;
17new foo1;
18new foo;
19}
20?>
21===DONE===
22--EXPECTF--
23Fatal error: Cannot mix bracketed namespace declarations with unbracketed namespace declarations in %sns_084.php on line 9
24