xref: /PHP-8.2/Zend/tests/anon/010.phpt (revision 83618934)
1--TEST--
2Trait binding after anon class
3--FILE--
4<?php
5
6trait T {
7    public function m1() { return 42; }
8}
9
10class C {
11    public function m2() {
12        return new class {};
13    }
14
15    use T;
16}
17
18$c = new C;
19var_dump($c->m1());
20
21?>
22--EXPECT--
23int(42)
24