3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Testing { public $arr = array(); public function &test() { $ob = new StdClass(); $ob->name = 'derp'; $this->arr[] = $ob; return $ob; } } $t = new Testing(); $derp = $t->test(); $derp->name = 'test'; echo $t->arr[0]->name;
Output for 5.2.13 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
test
Output for hhvm-3.10.0

Process exited with code 153.