3v4l.org

run code in 500+ PHP versions simultaneously
<?php $haystack = array( "id" => 1, "char1" => 2, "char2" => 3, "char3" => 4, ); $needles = array(2, 4); function in_array_all($needles, $haystack) { unset($haystack['id']); return empty(array_diff($needles, $haystack)); } $exists = in_array_all([2, 4], $haystack); // true var_dump($exists); $exists = in_array_all([1, 3], $haystack); // true var_dump($exists); print_r($haystack);
Output for git.master, git.master_jit, rfc.property-hooks
bool(true) bool(false) Array ( [id] => 1 [char1] => 2 [char2] => 3 [char3] => 4 )

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:
52.07 ms | 1265 KiB | 4 Q