1--TEST--
2GH-15419: Readonly classes may not declare promoted properties with hooks
3--FILE--
4<?php
5
6readonly class C {
7    public function __construct(
8        public int $prop { set => $value; },
9    ) {}
10}
11
12?>
13--EXPECTF--
14Fatal error: Hooked properties cannot be readonly in %s on line %d
15