1--TEST-- 2Backed property may have default value 3--FILE-- 4<?php 5 6class A { 7 public $prop = 42 { 8 get { 9 echo __METHOD__, "\n"; 10 return $this->prop; 11 } 12 set { 13 echo __METHOD__, "\n"; 14 $this->prop = $value; 15 } 16 } 17} 18 19$a = new A(); 20var_dump($a); 21var_dump($a->prop); 22$a->prop = 43; 23var_dump($a->prop); 24 25?> 26--EXPECT-- 27object(A)#1 (1) { 28 ["prop"]=> 29 int(42) 30} 31A::$prop::get 32int(42) 33A::$prop::set 34A::$prop::get 35int(43) 36