1--TEST--
2Using ReflectionClass::__toString() on readonly classes
3--FILE--
4<?php
5
6readonly class Foo {
7    public int $bar;
8    public readonly int $baz;
9}
10
11echo new ReflectionClass(Foo::class);
12
13?>
14--EXPECTF--
15Class [ <user> readonly class Foo ] {
16  @@ %s 3-6
17
18  - Constants [0] {
19  }
20
21  - Static properties [0] {
22  }
23
24  - Static methods [0] {
25  }
26
27  - Properties [2] {
28    Property [ public protected(set) readonly int $bar ]
29    Property [ public protected(set) readonly int $baz ]
30  }
31
32  - Methods [0] {
33  }
34}
35