strlen

Get string length

&reftitle.description; `int` `strlen` `string` `string`

Returns the length of the given `string`.

&reftitle.parameters;

`string`

- The `string` being measured for length.

&reftitle.returnvalues;

The length of the `string` in bytes.

&reftitle.examples;

### A `strlen` example

    <?php
    $str = 'abcdef';
    echo strlen($str); // 6

    $str = ' ab cd ';
    echo strlen($str); // 7
    ?>

&reftitle.notes;

`strlen` returns the number of bytes rather than the number of characters in a string.

&reftitle.seealso;

- `count`
- `grapheme_strlen`
- `iconv_strlen`
- `mb_strlen`