1--TEST-- 2Override plain property with hooked property 3--FILE-- 4<?php 5 6class A { 7 public $prop; 8} 9 10class B extends A { 11 public $prop { 12 get { 13 return 'B::$prop::get()'; 14 } 15 set { 16 echo "B::\$prop::set($value)\n"; 17 } 18 } 19} 20 21$a = new A(); 22$a->prop = 42; 23echo $a->prop, "\n"; 24 25$b = new B(); 26$b->prop = 42; 27echo $b->prop, "\n"; 28 29?> 30--EXPECT-- 3142 32B::$prop::set(42) 33B::$prop::get() 34