fork download
  1. <?php
  2.  
  3. $first = [
  4. ['column_name' => 3],
  5. ];
  6.  
  7. $second = [
  8. ['column_name' => 1],
  9. ['column_name' => 2],
  10. ['column_name' => 3],
  11. ['column_name' => 4],
  12. ];
  13.  
  14. $result = array_udiff(
  15. $second,
  16. $first,
  17. function($x, $y) { return strcmp($x['column_name'], $y['column_name']); }
  18. );
  19.  
  20. print_r($result);
  21.  
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
Array
(
    [0] => Array
        (
            [column_name] => 1
        )

    [1] => Array
        (
            [column_name] => 2
        )

    [3] => Array
        (
            [column_name] => 4
        )

)