3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fruits = ['apple', 'orange', 'melon', 'banana', 'pineapple']; $remove = ['apple', 'orange', 'melon', 'banana']; $result = array_diff($fruits, $remove); print_r($result);
Output for 7.1.25 - 7.1.27, 7.2.0 - 7.2.33, 7.3.0 - 7.3.1, 7.3.3 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.30, 8.2.0 - 8.2.26, 8.3.0 - 8.3.14, 8.4.1
Array ( [4] => pineapple )
Output for 7.3.2

Process exited with code 137.

preferences:
85.02 ms | 406 KiB | 5 Q