The strlen() function returns the length of a string.
strlen(
string)
Parameter | Description |
---|---|
string | Required. Specifies the string to check |
Return Value: | Returns the length of a string (in bytes) on success, and 0 if the string is empty |
---|---|
PHP Version: | 4+ |
Return the length of the string "Hello World":
<?php
echo strlen("Hello world!");
?>
Try it Yourself »
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!