3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function dump($array) { echo "key: ", key($array), ", current: ", current($array), "\n"; } $a = array('a' => 1, 'b' => 2, 'c' => 3); dump($a); next($a); dump($a);
Output for 4.4.1, 5.2.4 - 7.1.0
key: a, current: 1 key: b, current: 2
Output for 4.3.0 - 4.4.0, 4.4.2 - 5.2.3
key: a, current: 1 key: a, current: 1