Menu Home

lcfirst

osbo.com | PHP | Functions | lcfirst

Make a string's first character lowercase

Syntax

lcfirst ( string $str ) : string

Parameters

str

The input string.

Return

Returns the resulting string.

Examples

1

<?

$str = 'Hello World!';

$return = lcfirst($str);

echo $return;

?>
hello World!

2

<?

$str = 'hello world!';

$return = lcfirst($str);

echo $return;

?>
hello world!

3

<?

$str = 'HELLO WORLD!';

$return = lcfirst($str);

echo $return;

?>
hELLO WORLD!

PHP