PHP 8 reference · Multibyte String Functions

PHP mb_strtolower() Function

Convert a string to lowercase, including letters outside ASCII such as É, Ü and Cyrillic. The Unicode-aware strtolower().

PHP 8 Since 4.3

Create a free account to save this page, take notes and track your progress. Sign in

Syntax

mb_strtolower(string $string, ?string $encoding = null): string

Parameters

ParameterDescription
string The input string.
encoding optional The character encoding; defaults to mb_internal_encoding() (UTF-8).

Return value

The lowercased string.

Examples

Accented capitalsTry it yourself
<?php
echo strtolower("ÉCOLE"), "\n";
echo mb_strtolower("ÉCOLE"), "\n";

Output

École
école
Other alphabetsTry it yourself
<?php
echo mb_strtolower("ΑΘΗΝΑ"), "\n";
// lowercasing keeps ß, so use MB_CASE_FOLD to compare these
var_dump(mb_strtolower("Straße") === mb_strtolower("STRASSE"));

Output

αθηνα
bool(false)

Version history

VersionChange
PHP 4.3Added

In other languages

Was this page helpful?