PHP strspn() Function
The strspn() function is an in-built function in PHP which finds the length of the initial segment of a string consisting entirely of characters contained within a given list of characters passed as a parameter to the function. Syntax : strspn( $string, $charlist, $start, $length) Parameters : This