3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [ [ 'description' => 'aaaaaa', 'value' => 11111, 'id' => 14, ], [ 'description' => 'dddddd', 'value' => 44444, 'id' => 0, ], ]; $array2 = [ [ 'id' => 14, 'value' => 11111, 'description' => 'aaaaaa', ], [ 'id' => 15, 'value' => 222222, 'description' => 'bbbbbb', ], [ 'id' => 16, 'value' => 333333, 'description' => 'cccccc', ], ]; var_export( array_uintersect($array1, $array2, fn($a, $b) => $a <=> $b) );

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
181.12 ms | 1605 KiB | 12 Q