3v4l.org

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