66 of 410 menu

The lcfirst Function

The lcfirst function converts the first character of a string to lowercase. Works correctly only with Latin characters (single-byte characters).

Syntax

lcfirst(string $string): string

Example

Let's convert the first character of a string to lowercase:

<?php echo lcfirst('Abcde'); ?>

Code execution result:

'abcde'

See Also

  • the ucfirst function,
    which converts the first character to uppercase
  • the strtoupper function,
    which converts a string to lowercase
  • the strtolower function,
    which converts a string to uppercase
  • the ucwords function,
    which converts the first letters of words to uppercase
byenru