Source Code:
(back to article)
<?php $string = "Hello World"; $mask = "HeloWrd"; $start = 0; $length = null; $result = strspn($string, $mask, $start, $length); echo "The length of the initial segment of '$string' that matches the characters in '$mask' is $result";
Result:
Report an issue