fork download
  1. <?php
  2.  
  3. $array_1 = array('kartoshka', 'banana', 'Агент 007', 'Чай', 'Stephen Hawking');
  4. $array_2 = array('banana', 'Яблоко', 'Яблоко', 'kartoshka', 'Агент 007', '404: string_not_found');
  5.  
  6. print_r(array_merge(array_diff($array_1, $array_2), array_diff($array_2, $array_1)));
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
Array
(
    [0] => Чай
    [1] => Stephen Hawking
    [2] => Яблоко
    [3] => Яблоко
    [4] => 404: string_not_found
)