3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array("" => 'nullish'); $o = (object)$a; var_dump($a, $o, $o->{''});
based on mF4pt
Output for hhvm-3.12.0, 7.1.0
array(1) { [""]=> string(7) "nullish" } object(stdClass)#1 (1) { [""]=> string(7) "nullish" } string(7) "nullish"
Output for 7.0.0 - 7.0.14
Fatal error: Uncaught Error: Cannot access empty property in /in/NevIu:6 Stack trace: #0 {main} thrown in /in/NevIu on line 6
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.0.5 - 5.6.28
Fatal error: Cannot access empty property in /in/NevIu on line 6
Process exited with code 255.
Output for 5.0.0 - 5.0.4
array(1) { [""]=> string(7) "nullish" } object(stdClass)#1 (1) { [":private"]=> string(7) "nullish" } string(7) "nullish"
Output for 4.3.0 - 4.4.9
array(1) { [""]=> string(7) "nullish" } object(stdClass)(1) { [""]=> string(7) "nullish" } string(7) "nullish"