fork(1) download
  1. <?php
  2.  
  3. $currentValues = [1, 2];
  4. $newValues = [1, 3, 1, 4, 2];
  5. print_r(array_diff($newValues, $currentValues));
Success #stdin #stdout 0.02s 24448KB
stdin
Standard input is empty
stdout
Array
(
    [1] => 3
    [3] => 4
)