3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array( array('ITEM' => 1), array('ITEM' => 2), array('ITEM' => 3), ); $array2 = array( array('ITEMID' => 2), array('ITEMID' => 3), array('ITEMID' => 1), array('ITEMID' => 4), ); // PHP7.4+ (arrow functions) var_export( array_udiff($array2, $array1, fn($a, $b) => ($a['ITEM'] ?? $a['ITEMID']) <=> ($b['ITEM'] ?? $b['ITEMID'])) );
Output for git.master, git.master_jit, rfc.property-hooks
array ( 3 => array ( 'ITEMID' => 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:
50.14 ms | 401 KiB | 8 Q