xref: /PHP-8.0/Zend/tests/anon/014.phpt (revision ded3d984)
1--TEST--
2anonymous class trait binding
3--FILE--
4<?php
5trait TaskTrait {
6    function run() {
7        return 'Running...';
8    }
9}
10$class = new class() {
11  use TaskTrait;
12};
13var_dump($class->run());
14?>
15--EXPECT--
16string(10) "Running..."
17