3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = array('un', 'deux', 'trois', 'quatre', 'stop', 'cinq'); while (list(, $val) = each($arr)) { if ($val == 'stop') { break; /* Vous pourriez aussi utiliser 'break 1;' ici. */ } echo "$val<br />\n"; }
Output for 7.2.0
Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /in/0QTSN on line 4 un<br /> deux<br /> trois<br /> quatre<br />
Output for 5.3.21 - 7.1.10
un<br /> deux<br /> trois<br /> quatre<br />