1--TEST--
2Overridden hooked property that adds set to get only property becomes invariant
3--FILE--
4<?php
5
6class A {
7    public int|string $prop {
8        get { echo __CLASS__ . '::' . __METHOD__, "\n"; return 42; }
9    }
10}
11
12class B extends A {
13    public int $prop {
14        get { echo __CLASS__ . '::' . __METHOD__, "\n"; return 42; }
15        set { echo __CLASS__ . '::' . __METHOD__, "\n"; }
16    }
17}
18
19?>
20===DONE===
21--EXPECT--
22===DONE===
23