3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $y = ['2014','2015','2016','2017','2018','2019','2020']; for($i = 0, $c = count($y); $i < $c; $i++) //var_dump($i,$y[$i]); echo $i; echo $y[$i]; ?>
based on 8DIJp
Output for 5.4.10 - 7.2.0
0123456 Notice: Undefined offset: 7 in /in/eNbQB on line 14
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/eNbQB on line 6
Process exited with code 255.