<?php class Test { public $a = 1; public function &getA() { return [ &$this->a ];; } } $a = new Test(); $b = &$a->getA(); $a->a = 2; var_dump($b);
You have javascript disabled. You will not be able to edit any code.