1--TEST--
2Readonly classes cannot use dynamic properties
3--FILE--
4<?php
5
6readonly class Foo
7{
8}
9
10$foo = new Foo();
11
12try {
13    $foo->bar = 1;
14} catch (Error $exception) {
15    echo $exception->getMessage() . "\n";
16}
17
18?>
19--EXPECT--
20Cannot create dynamic property Foo::$bar
21