3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str= 'There must be a fast and efficient way to split a (text) string at the "nth" occurrence of a needle.'; var_export( preg_split('/([^ ]*\K ){2}/', $str, 2) );

preferences:
19.87 ms | 475 KiB | 4 Q