3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $s ='O:8:"stdClass":10:{s:2:"-8";i:0;s:2:"-7";i:0;s:2:"-6";i:0;s:2:"-5";i:0;s:2:"-4";i:0;s:2:"-3";i:0;s:2:"-2";i:0;s:2:"-1";i:0;s:1:"0";i:100;s:1:"1";i:0;}'; $obj=unserialize($s); $ar =(array)$obj; // var_dump($obj->{'0'}, $obj->{0}, $ar['0'], $ar[0]); foreach ($ar as $key => $value){ echo $key.' = '.$value."\n"; } ?>
based on jKPVv
Output for 4.3.0 - 7.1.0
-8 = 0 -7 = 0 -6 = 0 -5 = 0 -4 = 0 -3 = 0 -2 = 0 -1 = 0 0 = 100 1 = 0