strspn
symfony/var-dumper
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Finds the length of the initial segment of a string consisting entirely of characters contained within a given mask
<?php strspn
(
string $string
,
string $characters
,
int $offset
=
0
,
?
int $length
=
null
):
int