3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [ (object) ["email" => "gffggfg"], (object) ["email" => "wefwef@test.it"], (object) ["email" => "wefewf"], ]; $array2 = [ (object) ["email" => "gffggfg@test.it"], (object) ["email" => "wefwef"], (object) ["email" => "wefewf"], ]; var_export( array_unique(array_merge($array1, $array2)) );
Output for 7.4.0 - 7.4.33, 8.0.1 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught Error: Object of class stdClass could not be converted to string in /in/CoepY:15 Stack trace: #0 /in/CoepY(15): array_unique(Array) #1 {main} thrown in /in/CoepY on line 15
Process exited with code 255.

preferences:
105.6 ms | 402 KiB | 121 Q