$firstStringCharacter = substr("hello", 0, 1);
$words = explode(" ", $string);
$firstname = $words[0];
$lastname = $words[1];
$third_word = $words[2];
$value = "Test me more";
echo strtok($value, " "); // Test
function getFirstWord($string)
{
$arr = explode(' ', trim($string));
return isset($arr[0]) ? $arr[0] : $string;
}