3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array( array('pear', 'apple'), array('banana', 'coconut'), 'orange' // This is not an array element ); foreach($array as $value) { /*     if (is_array($value)) {         foreach($value as $fruit) {             echo $fruit . "<br>";         }     }     else {         echo $value . "<br>";     }*/ }
based on EMsE9
Output for 4.3.0 - 7.1.0