3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = [5,6,7]; $obj = (object)$arr; var_dump($obj);
Output for 7.2.0 - 7.3.0alpha1
object(stdClass)#1 (3) { ["0"]=> int(5) ["1"]=> int(6) ["2"]=> int(7) }
Output for 5.6.0 - 7.1.7
object(stdClass)#1 (3) { [0]=> int(5) [1]=> int(6) [2]=> int(7) }