3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $myArray=array('aa' => array('d' => 'r'), 'aa2' => array('d' => 'r')); reset($myArray); while (list ($key, $val) = each ($myArray) ) { var_dump($key); var_dump($val); }
based on OcjvT
Output for 7.2.0
Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /in/UOaAr on line 5 string(2) "aa" array(1) { ["d"]=> string(1) "r" } string(3) "aa2" array(1) { ["d"]=> string(1) "r" }
Output for 5.3.17 - 7.1.10
string(2) "aa" array(1) { ["d"]=> string(1) "r" } string(3) "aa2" array(1) { ["d"]=> string(1) "r" }