3v4l.org

run code in 300+ PHP versions simultaneously
<?php $haystack = array( 'A', 'B' => array('BA'), 'C' => array('CA' => array('CAA')), 'D' => array('DA' => array('DAA' => array('DAAA'))) ); function array_find($needle, array $haystack) { foreach ($haystack as $value) { if (is_array($value)) { if (in_array($needle, $value)) { return true; } else { if (array_find($needle, $value)) { return true; } } } else { if ($value == $needle) { return true; } } } return false; } $find = array('A', 'BA', 'CAA', 'DAAA'); foreach($find as $needle) { if (array_find($needle, $haystack)) { echo $needle, " found".PHP_EOL; } else { echo $needle, " not found".PHP_EOL; } }
Output for git.master, git.master_jit, rfc.property-hooks
A found BA found CAA found DAAA found

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
46.16 ms | 401 KiB | 8 Q