1--TEST--
2Overridden hooked property can add set to get only property
3--FILE--
4<?php
5
6class A {
7    public $prop {
8        get { echo __CLASS__ . '::' . __METHOD__, "\n"; return 42; }
9    }
10}
11
12class B extends A {
13    public $prop {
14        get { echo __CLASS__ . '::' . __METHOD__, "\n"; return 42; }
15        set { echo __CLASS__ . '::' . __METHOD__, "\n"; }
16    }
17}
18
19$a = new A;
20try {
21    $a->prop = 1;
22} catch (Error $e) {
23    echo $e->getMessage(), "\n";
24}
25var_dump($a->prop);
26
27$b = new B;
28$b->prop = 1;
29var_dump($b->prop);
30
31?>
32--EXPECT--
33Property A::$prop is read-only
34A::A::$prop::get
35int(42)
36B::B::$prop::set
37B::B::$prop::get
38int(42)
39