3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new stdClass; $a->id = 1; $b = $a; // mesmo objeto $c = new stdClass; $c->id = 2; $test = array($a, $b, $c); print_r(array_unique($test, SORT_REGULAR));

preferences:
62.4 ms | 405 KiB | 5 Q