3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern='<\b(?:apple|orange|pear|lemon|Goji berry)\b>i'; $phrase="I will buy an apple to do an applepie!"; preg_match_all($pattern,$phrase,$match); print_r($match);

preferences:
25.97 ms | 402 KiB | 5 Q