Home

mbstrtolower

mb_strtolower is a PHP function provided by the mbstring extension that converts a string to lowercase in a multibyte-aware manner. It is designed to correctly handle non-ASCII characters by using the specified encoding’s case mappings, making it suitable for international text.

Syntax and parameters

The function signature is mb_strtolower(string $str [, string $encoding = mb_internal_encoding()]). The default encoding is the value returned

Return value and behavior

mb_strtolower returns a string in which all alphabetic characters have been converted to lowercase according to

Notes and context

mb_strtolower is part of the mbstring extension and requires it to be enabled in the PHP installation.

See also

mb_strtoupper, mb_convert_case, and related mbstring functions for case conversion and encoding handling.

by
mb_internal_encoding().
The
first
argument
$str
is
the
input
string.
The
optional
$encoding
parameter
selects
the
character
encoding
to
apply
when
determining
lowercase
mappings,
with
common
choices
including
UTF-8,
ISO-8859-1,
and
EUC-JP.
The
function
is
encoding-aware
rather
than
locale-based.
the
specified
encoding.
Characters
without
a
lowercase
mapping
or
that
are
not
letters
remain
unchanged.
If
the
encoding
is
unsupported
or
an
error
occurs,
the
function
returns
false.
It
is
multibyte-safe
and
commonly
used
to
normalize
text
for
comparisons,
storage,
or
display.
It
differs
from
the
non-multibyte
strtolower
function
in
that
it
correctly
handles
multibyte
character
sets
rather
than
relying
on
locale-dependent
behavior.