1--TEST-- 2Operators on overlaoded property reference 3--FILE-- 4<?php 5class C { 6 function __construct() { $this->bar = str_repeat("1", 2); } 7 function &__get($x) { return $this->bar; } 8 function __set($x, $v) { $this->bar = $v; } 9} 10$x = new C; 11var_dump(++$x->foo); 12$x = new C; 13var_dump($x->foo++); 14$x = new C; 15var_dump($x->foo += 2); 16?> 17--EXPECT-- 18int(12) 19string(2) "11" 20int(13) 21