3v4l.org

run code in 150+ 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];
based on 9Y1nH
Output for 4.3.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: Illegal offset type in /in/uhDbu on line 4 Warning: Illegal offset type in /in/uhDbu on line 5 Warning: Illegal offset type in /in/uhDbu on line 6 Warning: Illegal offset type in /in/uhDbu on line 8
Output for hhvm-3.12.0
Warning: Illegal offset type in /in/uhDbu on line 4 Warning: Illegal offset type in /in/uhDbu on line 5 Warning: Illegal offset type in /in/uhDbu on line 6 Warning: Invalid operand type was used: Invalid type used as key in /in/uhDbu on line 8 Notice: Array to string conversion in /in/uhDbu on line 8 Notice: Undefined index: Array in /in/uhDbu on line 8
Output for hhvm-3.10.0

Process exited with code 153.