3v4l.org

run code in 500+ 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:
129.35 ms | 2684 KiB | 5 Q