Query: strlen
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
STRLEN(3) 1 STRLEN(3) strlen - Get string lengthSYNOPSISint strlen (string $string)DESCRIPTIONReturns the length of the given $string.PARAMETERSo $string - The string being measured for length.RETURN VALUESThe length of the $string on success, and 0 if the $string is empty.CHANGELOG+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.3.0 | | | | | | | Prior versions treated arrays as the string | | | Array, thus returning a string length of 5 and | | | emitting an E_NOTICE level error. | | | | +--------+---------------------------------------------------+EXAMPLESExample #1 A strlen(3) example <?php $str = 'abcdef'; echo strlen($str); // 6 $str = ' ab cd '; echo strlen($str); // 7 ?>NOTESNote strlen(3) returns the number of bytes rather than the number of characters in a string. Note strlen(3) returns NULL when executed on arrays, and an E_WARNING level error is emitted.SEE ALSOcount(3), grapheme_strlen(3), iconv_strlen(3), mb_strlen(3). PHP Documentation Group STRLEN(3)
Related Man Pages |
---|
strlen(3p) - centos |
strlen(3) - osf1 |
strlen(3) - xfree86 |
strlen(3) - plan9 |
strlen(3) - v7 |