3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array(array("1" => "a", "2" => "hello a1", "3" => "ab", "4" => "ab1", "5" => "hello ab1"), array("1" => "a", "2" => "hello a1", "3" => "ab", "4" => "ab2", "5" => "hello ab2"), array("1" => "a", "2" => "hello a1", "3" => "ac", "4" => "ac2", "5" => "hello ac2"), array("1" => "b", "2" => "hello b1", "3" => "bb", "4" => "bb1", "5" => "hello bb1"), array("1" => "b", "2" => "hello b1", "3" => "bb", "4" => "bb2", "5" => "hello bb2"), array("1" => "b", "2" => "hello b1", "3" => "bc", "4" => "bc3", "5" => "hello bc3"), ); foreach ($array as $key) { foreach ($key as $value) { echo $value; echo "<br>"; } }
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.6
a<br>hello a1<br>ab<br>ab1<br>hello ab1<br>a<br>hello a1<br>ab<br>ab2<br>hello ab2<br>a<br>hello a1<br>ac<br>ac2<br>hello ac2<br>b<br>hello b1<br>bb<br>bb1<br>hello bb1<br>b<br>hello b1<br>bb<br>bb2<br>hello bb2<br>b<br>hello b1<br>bc<br>bc3<br>hello bc3<br>