3v4l.org

run code in 300+ PHP versions simultaneously
<?php function c_in_array($needle, $haystack){ if(!is_array($haystack)){ return false; } foreach($haystack as $index => $value){ if(is_array($value)){ return c_in_array($needle, $value); }else{ if($needle == $value){ return true; } } } return false; } $array = []; $array[] = ['content' => '192.168.178.1', 'disabled' => true]; $array[] = ['content' => '192.168.178.2', 'disabled' => false]; var_dump($array, c_in_array('192.168.178.4', $array)); //var_dump($array, array_search('192.168.178.2', $array));
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { [0]=> array(2) { ["content"]=> string(13) "192.168.178.1" ["disabled"]=> bool(true) } [1]=> array(2) { ["content"]=> string(13) "192.168.178.2" ["disabled"]=> bool(false) } } bool(true)

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