3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(array([0]=>'Ekin'),array([0]=>'Luna'),array([0]=>'Asd')); for ($i=0; $i < count($a); $i++) { if($i < 1){ $fname = $a[0][0]; } else { $fname = $a[$i-1][0]; } echo $fname; }
based on roq2i
Output for 7.0.0
Fatal error: Illegal offset type in /in/C9F26 on line 2
Process exited with code 255.
Output for 5.4.10 - 5.6.28
Warning: Illegal offset type in /in/C9F26 on line 2 Warning: Illegal offset type in /in/C9F26 on line 2 Warning: Illegal offset type in /in/C9F26 on line 2 Notice: Undefined offset: 0 in /in/C9F26 on line 5 Notice: Undefined offset: 0 in /in/C9F26 on line 7 Notice: Undefined offset: 0 in /in/C9F26 on line 7
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/C9F26 on line 2
Process exited with code 255.