English [leŋθ] American [leŋθ]

n.Length, long; length of time; (speech) sound length; paragraph, section

Plural: lengths

php strlen() function syntax

Function: Return the length of the string

Syntax: strlen(string)

Parameters:

ParametersDescription
stringRequired. Specifies the string to check.

Description: Returns the length of the string.

php strlen() function example

<?php
echo strlen("I love php!");
?>

Run Instance»

Click the "Run Instance" button to view the online instance

Output:

11
<?php
echo strlen("i study php at php.cn");
?>

Run Instance»

Click the "Run Instance" button to view the online instance

Output:

21