3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array("\n" => 'nullish'); $o = (object)$a; var_dump($a, $o);
based on YCT4U
Output for 5.0.0 - 7.1.0
array(1) { [" "]=> string(7) "nullish" } object(stdClass)#1 (1) { [" "]=> string(7) "nullish" }
Output for 4.3.0 - 4.4.9
array(1) { [" "]=> string(7) "nullish" } object(stdClass)(1) { [" "]=> string(7) "nullish" }