3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $original = unserialize('O:8:"stdClass":1:{s:4:"1134";i:1;}'); $result = (array)$original; print_r ($result); //Array ( [1134] => 1 ) print_r($result["1134"]); //Undefined offset: 1134 print_r($result['1134']); //Undefined offset: 1134 print_r($result[1134]); //Undefined offset: 1134
Output for 7.2.0 - 7.3.0rc3
Array ( [1134] => 1 ) 111
Output for 5.6.38 - 7.1.23
Array ( [1134] => 1 ) Notice: Undefined offset: 1134 in /in/h0eWQ on line 8 Notice: Undefined offset: 1134 in /in/h0eWQ on line 9 Notice: Undefined offset: 1134 in /in/h0eWQ on line 10