xref: /php-src/Zend/tests/anon/007.phpt (revision 7aacc705)
1--TEST--
2testing anon classes in functions outside of classes in namespaces
3--FILE--
4<?php
5namespace lone {
6    function my_factory() {
7        return new class{};
8    }
9
10    class Outer {
11
12        public function __construct() {
13             var_dump(
14                my_factory());
15        }
16    }
17
18    new Outer();
19}
20?>
21--EXPECTF--
22object(class@%s)#2 (0) {
23}
24