- print_r: documentation ( source)
- preg_split: documentation ( source)
<?php
$string = 'There is something to type here. This is an example text';
$string = preg_split("/([^\s]*\s+[^\s]*\s+[^\s]*\s+[^\s]*\s+[^\s]*)\s+/", $string, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY);
print_r($string);