Are there any specific PHP functions or methods that can be used to find a common substring in two strings from position 0?

To find a common substring in two strings starting from position 0, we can use the `strspn` function in PHP. This function returns the length of the initial segment of a string consisting entirely of characters contained in a given mask. By using this function with the two input strings as the mask, we can find the common substring starting from the beginning of the strings.

$string1 = "hello world";
$string2 = "hello there";

$common_substring = substr($string1, 0, strspn($string1, $string2));
echo $common_substring;