1--TEST--
2Property fetch in default argument
3--FILE--
4<?php
5
6enum A: string {
7    case B = 'C';
8}
9
10function test(
11    $name = A::B->name,
12    $value = A::B->value,
13    $nameNullsafe = A::B?->name,
14    $valueNullsafe = A::B?->value,
15) {
16    var_dump($name);
17    var_dump($value);
18    var_dump($nameNullsafe);
19    var_dump($valueNullsafe);
20}
21
22test();
23test('D', 'E', 'F', 'G');
24
25?>
26--EXPECT--
27string(1) "B"
28string(1) "C"
29string(1) "B"
30string(1) "C"
31string(1) "D"
32string(1) "E"
33string(1) "F"
34string(1) "G"
35