3v4l.org

run code in 300+ PHP versions simultaneously
<?php $first = "apple,carrot,pine"; $second = "fruit,veggie,tree"; $array1 = explode(",", $first); $array2 = explode(",", $second); reset($array1); reset($array2); while (key($array1) !== null && key($array2) !== null) { $number1 = current($array1); $number2 = current($array2); echo $number1, $number2, "<br>"; next($array1); next($array2); }

preferences:
26.73 ms | 402 KiB | 5 Q