3v4l.org

run code in 300+ PHP versions simultaneously
<?php function strInArray($haystack, $needle) { $i = 0; foreach ($haystack as $value) { $result = stripos($value,$needle); if ($result !== FALSE) return TRUE; $i++; } return FALSE; } $array = array(12,43,66,21,56,43,43,78,78,100,43,43,43,21); for ($i = 0; $i < count($array); $i++) { if (strInArray($array,$array[$i])) { unset($array[$i]); } } var_dump($array);
Output for git.master, git.master_jit, rfc.property-hooks
array(7) { [7]=> int(78) [8]=> int(78) [9]=> int(100) [10]=> int(43) [11]=> int(43) [12]=> int(43) [13]=> int(21) }

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:
20.65 ms | 401 KiB | 8 Q