3v4l.org

run code in 300+ PHP versions simultaneously
<?php function compare($a, $b) { // echo("$a : $b\n"); return ($a == $b ? 0 : 1); // return strcmp($a, $b); } $a = array('11', '21', '31', '41', '11'); $b = array('12', '22', '32', '42', '52', '11'); var_dump(array_udiff($a, $b, 'compare')); echo "\n\n"; $a_new = array_combine($a, array_fill(0, count($a), 1)); $b_new = array_combine($b, array_fill(0, count($b), 1)); var_dump(array_diff_uassoc($a_new, $b_new, 'compare')); echo "\n\n";
Output for git.master, git.master_jit, rfc.property-hooks
array(5) { [0]=> string(2) "11" [1]=> string(2) "21" [2]=> string(2) "31" [3]=> string(2) "41" [4]=> string(2) "11" } array(3) { [21]=> int(1) [31]=> int(1) [41]=> int(1) }

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:
30.29 ms | 402 KiB | 8 Q