1--TEST--
2Fix GH-9186 Readonly classes can have dynamic properties created by unserialize()
3--FILE--
4<?php
5
6readonly class C {}
7
8try {
9    $readonly = unserialize('O:1:"C":1:{s:1:"x";b:1;}');
10} catch (Error $exception) {
11    echo $exception->getMessage() . "\n";
12}
13
14?>
15--EXPECT--
16Cannot create dynamic property C::$x
17