3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array(); $array['1'] = 1; $array["01"] = 2; var_dump($array); var_dump($array[0]);
Output for 5.3.28 - 5.3.29, 5.4.20 - 7.1.0
array(2) { [1]=> int(1) ["01"]=> int(2) } Notice: Undefined offset: 0 in /in/Mb77o on line 7 NULL
Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.19
array(2) { [1]=> int(1) ["01"]=> int(2) } Notice: Undefined offset: 0 in /in/JBMbr on line 7 NULL
Output for 4.3.1 - 5.2.17
array(2) { [1]=> int(1) ["01"]=> int(2) } Notice: Undefined offset: 0 in /in/JBMbr on line 7 NULL
Output for 4.3.0
array(2) { [1]=> int(1) ["01"]=> int(2) } Notice: Undefined offset: 0 in /in/Mb77o on line 7 NULL