3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function in_array_r($needle, $haystack, $strict = false) { foreach ($haystack as $item) { if (($strict ? $item === $needle : $item == $needle) || (is_array($item) && in_array_r($needle, $item, $strict))) { return true; } } return false; } $b = array(array("Mac", "NT"), array("Irix", "Linux")); echo in_array_r("Irix", $b) ? 'found' : 'not found'; ?>
Output for 4.3.0 - 7.1.0
found