3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = [0, 1, 2]; foreach ($array as $key=> &$val) { var_dump(current($array)); }
Output for 7.1.2
int(0) int(0) int(0)