xref: /php-src/Zend/tests/enum/namespaces.phpt (revision 269c8dac)
1--TEST--
2Enum namespace
3--FILE--
4<?php
5
6namespace Foo {
7    enum Bar {
8        case Baz;
9
10        public function dump() {
11            var_dump(Bar::Baz);
12        }
13    }
14
15    function dumpBar() {
16        Bar::Baz->dump();
17    }
18}
19
20namespace {
21    use Foo\Bar;
22
23    \Foo\dumpBar();
24    \Foo\Bar::Baz->dump();
25    Bar::Baz->dump();
26}
27
28?>
29--EXPECT--
30enum(Foo\Bar::Baz)
31enum(Foo\Bar::Baz)
32enum(Foo\Bar::Baz)
33