3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = array("one", "two", "three"); reset($arr); while (list(, $value) = each($arr)) { echo "Value: $value<br />\n"; } foreach ($arr as $value) { echo "Value: $value<br />\n"; }
based on l5Ztd
Output for 7.2.0
Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /in/r1b8n on line 5 Value: one<br /> Value: two<br /> Value: three<br /> Value: one<br /> Value: two<br /> Value: three<br />
Output for 5.3.22 - 7.1.10
Value: one<br /> Value: two<br /> Value: three<br /> Value: one<br /> Value: two<br /> Value: three<br />