3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a= [['a', 10], ['b', 11], ['c', 12], ['d', 13]]; $b = [['k', 21], ['l', 22], ['m', 23]]; $diff = array_udiff($a, $b, function($o1, $o2) { echo 'comparing ' . $o1[0] . ', ' . $o2[0] . PHP_EOL; return $o1[1] - $o2[1]; }); var_dump($diff);
Output for git.master, git.master_jit, rfc.property-hooks
comparing a, b comparing b, c comparing c, d comparing k, l comparing l, m comparing a, k comparing a, b comparing b, k comparing b, c comparing c, k comparing c, d comparing d, k array(4) { [0]=> array(2) { [0]=> string(1) "a" [1]=> int(10) } [1]=> array(2) { [0]=> string(1) "b" [1]=> int(11) } [2]=> array(2) { [0]=> string(1) "c" [1]=> int(12) } [3]=> array(2) { [0]=> string(1) "d" [1]=> int(13) } }

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