strlen

Get string length

Syntax

strlen ( string $string ) : int

Parameters

string

The string being measured for length.

Return

The length of the string on success, and 0 if the string is empty.

Examples

1

<?

$string = 'Hello World!';

$return = strlen($string);

echo $return;

?>
12
HomeMenu