3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array(2,1,3); $c = array(); foreach($a as $b){ $c[$a] = $a; } var_dump($c);
Output for 4.3.0 - 7.1.0
Warning: Illegal offset type in /in/Muos3 on line 5 Warning: Illegal offset type in /in/Muos3 on line 5 Warning: Illegal offset type in /in/Muos3 on line 5 array(0) { }