<?php class Foo { public $prop = 0; public function &getPropRef () { return ($this->prop); } } $obj = new Foo(); $variable = &$obj->getPropRef(); $variable = 1; $variable = 2; $variable = 3; echo $obj->prop;
You have javascript disabled. You will not be able to edit any code.