<?php
$strings = array("FARMER John", "OVERMARS DE Rafa", "VAN DER BELT Dick");

$regex = '~^([A-Z ]+\b)(\w+)$~';

foreach ($strings as $string) {
	if(preg_match($regex, $string, $match)) {
		$surname = trim($match[1]);
		$forename = trim($match[2]);
		echo "Surname: $surname, Forename: $forename\n";
	}
}

?>