mb_lcfirst()

mb_lcfirst() — Make a string's first character lowercase.

Built-in function of PHP 8.5. The manual lists it as available in PHP 8 >= 8.4.0. This page is the reference card: signature, parameters and return value, plus the changelog and the example the manual provides.

What it does

Performs a multi-byte safe lcfirst() operation, and returns a string with the first character of string lowercased.

Signature

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

Parameters

ParameterTypeWhat it takes
$stringstringThe input string.
$encoding?stringThe encoding parameter is the character encoding. If it is omitted or null, the internal character encoding value will be used.

Return value

Returns the resulting string.

Example

The PHP manual ships no example for mb_lcfirst(); the signature and the parameter table above are the contract.

See also

mb_ucfirst(), lcfirst()

All PHP 8.5 built-in functions

Reference card built from the PHP manual page mb_lcfirst() (PHP documentation, CC BY 3.0). The page is generated from the manual, so the wording of the parameter and return value text follows php.net.