xref: /PHP-8.0/Zend/tests/traits/static_002.phpt (revision f8d79582)
1--TEST--
2Traits with static methods referenced using variable.
3--CREDITS--
4Simas Toleikis simast@gmail.com
5--FILE--
6<?php
7
8    trait TestTrait {
9        public static function test() {
10            return 'Test';
11        }
12    }
13
14    class A {
15        use TestTrait;
16    }
17
18    $class = "A";
19    echo $class::test();
20
21?>
22--EXPECT--
23Test
24