← All docs

iconv_strlen()

Returns the character count of a string in the requested encoding.

iconv_strlen()

function iconv_strlen(string $string, ?string $encoding = null): mixed

Returns the character count of a string in the requested encoding.

Parameters:

  • $string (string)
  • $encoding (?string), default null, optional

Returns: mixed

Availability

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how iconv_strlen is implemented in the compiler, see the internals page.