3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = new stdClass(); $a->{0} = 'woot'; $a = (array) $a; var_dump($a); var_dump(isset($a[0]));
Output for 7.2.0 - 7.3.0alpha1
array(1) { [0]=> string(4) "woot" } bool(true)
Output for 5.0.0 - 5.6.30, hhvm-3.10.1 - 3.17.3, 7.0.0 - 7.1.7
array(1) { ["0"]=> string(4) "woot" } bool(false)
Output for 4.3.3 - 4.4.9
Fatal error: Property name must be a string in /in/EhMB6 on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.2

Process exited with code 139.