1--TEST-- 2Property with hook may override default value 3--FILE-- 4<?php 5 6class A { 7 public $prop = 41; 8} 9 10class B extends A { 11 public $prop = 42 { 12 get { 13 return 43; 14 } 15 } 16} 17 18$b = new B(); 19var_dump($b); 20var_dump($b->prop); 21$b->prop = 44; 22var_dump($b); 23var_dump($b->prop); 24 25?> 26--EXPECT-- 27object(B)#1 (1) { 28 ["prop"]=> 29 int(42) 30} 31int(43) 32object(B)#1 (1) { 33 ["prop"]=> 34 int(44) 35} 36int(43) 37