3v4l.org

run code in 200+ PHP versions simultaneously
<?php $array1 = array(1,2,3,4); $array2 = array(1,4); $leftovers = array_diff($array1, $array2); var_dump($leftovers);
Output for 7.1.25 - 7.3.5
array(2) { [1]=> int(2) [2]=> int(3) }