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

phplcfirst(string $string): string

Example

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

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

Code execution result:

php'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