3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { public $id; public $name; } $a = new Foo(); $a->id = 1; $a->name = 'bar' $b = $a; echo $b->name;
Output for 5.4.0 - 5.4.15
Parse error: syntax error, unexpected '$b' (T_VARIABLE) in Lb5FA on line 12
Process exited with code 255.
Output for 5.3.25
Parse error: syntax error, unexpected T_VARIABLE in /in/i2tvB on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.24
Parse error: syntax error, unexpected T_VARIABLE in Lb5FA on line 12
Process exited with code 255.