int strlen(string $str)

Returns the length, in characters, of $str.

For the length of a string variable named $var, it is now recommended to use $var.stringLength() instead of strlen($var).