3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fruits = ['apple', 'orange', 'melon', 'banana', 'pineapple']; $fruits = array_filter($fruits, function($fruit) { return !in_array($fruit, ['apple', 'orange', 'melon', 'banana']); }); print_r($fruits);

preferences:
39.38 ms | 405 KiB | 5 Q