1--TEST--
2Readonly class reflection
3--FILE--
4<?php
5
6class Foo {
7}
8
9readonly class Bar {
10}
11
12$foo = new ReflectionClass(Foo::class);
13var_dump($foo->isReadOnly());
14var_dump(($foo->getModifiers() & ReflectionClass::IS_READONLY) != 0);
15
16$bar = new ReflectionClass(Bar::class);
17var_dump($bar->isReadOnly());
18var_dump(($bar->getModifiers() & ReflectionClass::IS_READONLY) != 0);
19
20?>
21--EXPECT--
22bool(false)
23bool(false)
24bool(true)
25bool(true)
26