3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "Hello World Hey How Are You Doing"; $res = preg_match_all("/(?|(?:^|\h)(?=(\S+(?: \S+){2}))|(\S+))/", $string, $matches); print_r($matches[1]);

preferences:
33.03 ms | 402 KiB | 5 Q