3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items = array(new \stdClass(), new \stdClass()); $udiff = array_udiff($items, $items, function ($a, $b) { if ($a < $b) return -1; if ($a > $b) return 1; return 0; }); var_dump($udiff);

preferences:
40.09 ms | 406 KiB | 6 Q