3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fruits = ['apple', 'orange', 'melon', 'banana', 'pineapple']; $find = ['pineapple']; $result = array_intersect($fruits, $find); print_r($result);

preferences:
28.66 ms | 405 KiB | 5 Q