3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $result = array( 1=> '大扫除', '3.3'=> ' 搜索 ', '456' => '333', ); var_dump($a=(object)$result); foreach($a as $c=> $b){ echo $c; } var_dump($a->{'1'});
based on tqmhq
Output for 7.2.6 - 7.3.0beta1
object(stdClass)#1 (3) { ["1"]=> string(9) "大扫除" ["3.3"]=> string(8) " 搜索 " ["456"]=> string(3) "333" } 13.3456string(9) "大扫除"
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.1.20
object(stdClass)#1 (3) { [1]=> string(9) "大扫除" ["3.3"]=> string(8) " 搜索 " [456]=> string(3) "333" } 13.3456 Notice: Undefined property: stdClass::$1 in /in/hTNBR on line 12 NULL