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]); ?>
based on HEib7
Output for 5.4.0 - 7.1.0
Notice: Undefined offset: 0 in /in/jKPVv on line 6 Notice: Undefined offset: 0 in /in/jKPVv on line 6 int(100) int(100) NULL NULL
Output for 5.3.9 - 5.3.29
Notice: Undefined index: 0 in /in/jKPVv on line 6 Notice: Undefined offset: 0 in /in/jKPVv on line 6 int(100) int(100) NULL NULL
Output for 5.2.6 - 5.3.8
Notice: Undefined property: stdClass::$0 in /in/jKPVv on line 6 Notice: Undefined property: stdClass::$0 in /in/jKPVv on line 6 NULL NULL int(100) int(100)
Output for 5.0.0 - 5.2.5
Notice: Undefined index: 0 in /in/jKPVv on line 6 Notice: Undefined offset: 0 in /in/jKPVv on line 6 int(100) int(100) NULL NULL
Output for 4.3.3 - 4.4.9
Fatal error: Property name must be a string in /in/jKPVv on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.2

Process exited with code 139.