← All built-ins / ucfirst()

ucfirst()

ucfirst(string $s): string

Parameters

NameTypeDescription
$sstringinput string

Return value

The string with its first character uppercased.

Example

echo ucfirst("hello world");
Hello world

See also

lcfirst()ucwords()strtoupper()