strlen()


int strlen ( string $str)

Description

strlen() returns the length of a string, excluding the terminating null bytes(0)

※ available F/W version : all

Parameters

Return values

Returns the number of bytes of the $str, PHP error on error

Example

<?php
$str = "Hello PHPoC!";
$ret = strlen($str);
printf("str = %s, ret = %d\r\n", $str, $ret);  // OUTPUT: str = Hello PHPoC!, ret = 12
?>

See also

None

Remarks

This function is identical to the PHP group’s strlen() function.