3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $id=array(1,2,3); $age = array(); $age[$id[0]]="35"; $age[$id[2]]="37"; $age[$id[3]]="43"; echo $age[$id];
based on uhDbu
Output for 5.3.0 - 7.1.0
Notice: Undefined offset: 3 in /in/F2IiZ on line 6 Warning: Illegal offset type in /in/F2IiZ on line 8
Output for 4.3.0 - 5.2.17
Notice: Undefined offset: 3 in /in/F2IiZ on line 6 Warning: Illegal offset type in /in/F2IiZ on line 8