3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo() { public $a = 1; public $b = 2; } class Bar() { public $ref; } $foo = new Foo(); $bar = new Bar(); $bar->ref =& $foo->a; $bar->ref = '123'; var_dump($foo);
Output for 5.3.0 - 5.4.25
Parse error: syntax error, unexpected '(', expecting '{' in /in/32f21 on line 3
Process exited with code 255.