3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Klass { public $propA = 'Prop A'; public $propB = 'Prop B'; } $inst = new Klass(); $vars = &(array)$inst; $vars['propA'] = 'Modified Prop A'; print "Mod check: ".$inst->propA;
Output for 5.4.0 - 5.4.26
Parse error: syntax error, unexpected '(array)' (array) (T_ARRAY_CAST) in /in/Ycme8 on line 8
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_ARRAY_CAST in /in/Ycme8 on line 8
Process exited with code 255.