3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $alpha = array ('a', 'b', 'c', 'd'); $num = array ('1', '2', '3', '4'); foreach ($alpha as $key => $a) { $n = $num[$key]; echo "alpha: >{$a}<, num: >{$n}<\n"; }
Output for 4.3.0 - 7.1.10
alpha: >a<, num: >1< alpha: >b<, num: >2< alpha: >c<, num: >3< alpha: >d<, num: >4<