← All built-ins / strlen()
strlen()
strlen(mixed $v): int
Parameters
| Name | Type | Description |
|---|---|---|
| $v | string|array | the string (bytes) or array (elements) to measure |
Return value
Number of bytes in the string, or number of elements in the array.
Example
echo strlen("HolyPHP"), "
";
echo strlen(""), "
";7 0