3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $obj = new stdClass; $obj->{123} = '456'; print_r($obj); if (property_exists($obj,123)) echo 'Property 123 exists',"\n"; if (isset($obj->{123})) { echo "Property value: {$obj->{123}}\n";
based on jomf2
Output for 5.4.0 - 5.4.34
Parse error: syntax error, unexpected end of file in /in/iBr9e on line 7
Process exited with code 255.
Output for 5.1.0 - 5.3.29
Parse error: syntax error, unexpected $end in /in/iBr9e on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected $ in /in/iBr9e on line 7
Process exited with code 255.
Output for 4.3.3 - 4.4.9
Fatal error: Property name must be a string in /in/iBr9e on line 3
Process exited with code 255.
Output for 4.3.2
Parse error: parse error in /in/iBr9e on line 7
Process exited with code 255.