3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = (object)[false]; $foo->{0} = true; $foo = (array)$foo; $bar = json_encode($foo); // {"0":false,"0":true} var_dump(json_decode($bar));
based on q89X8
Output for 7.2.0
array(1) { [0]=> bool(true) }
Output for 5.5.0 - 7.1.10
object(stdClass)#1 (1) { ["0"]=> bool(true) }