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) { $found = false; $search = array('needle' => $needle, 'found' => &$found); array_walk_recursive($haystack, function($val, $key, $found) { if ($found['needle'] == $val) $found['found'] = true; }, $search); return $found;} $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:
36.2 ms | 401 KiB | 8 Q