3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array("\0" => 'nullish'); $o = (object)$a; var_dump($a, $o);
Output for 5.2.0 - 5.6.28, 7.0.0 - 7.1.0
array(1) { [""]=> string(7) "nullish" } object(stdClass)#1 (1) { Notice: Illegal member variable name in /in/Ed22D on line 6 [""]=> string(7) "nullish" }
Output for hhvm-3.12.0
array(1) { [""]=> string(7) "nullish" } object(stdClass)#1 (1) { ["":"":private]=> string(7) "nullish" }
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.0.0 - 5.1.6
array(1) { [""]=> string(7) "nullish" } object(stdClass)#1 (1) { [":private"]=> string(7) "nullish" }
Output for 4.3.5 - 4.4.9
array(1) { [""]=> string(7) "nullish" } object(stdClass)(1) { [""]=> string(7) "nullish" }
Output for 4.3.0 - 4.3.4
array(1) { [""]=> string(7) "nullish" } object(stdClass)(1) { [""]=> string(7) "nullish" }