xref: /PHP-8.1/Zend/tests/bug70958.phpt (revision f8d79582)
1--TEST--
2Bug #70958 (Invalid opcode while using ::class as trait method parameter default value)
3--FILE--
4<?php
5trait Foo
6{
7    function bar($a = self::class) {
8        var_dump($a);
9    }
10}
11
12class B {
13    use Foo;
14}
15
16$b = new B;
17
18$b->bar();
19?>
20--EXPECT--
21string(1) "B"
22