PHP ucfirst() Function converts only the first character of a string into uppercase. The ucfirst() Function is php in-built function.
string : Required. It is required to make only the first characters of string to uppercase.
It returns the uppercased first characters of whole string.
Similar function of ucfirst() :
ucwords(): It makes the first character of each word to uppercase in string..
strtolower() : It converts a whole string into lowercase.
lcfirst() : It converts only the first character of a string into lowercase.
strtoupper() : It converts a whole string into uppercase.
Let's see below example to understand php ucfirst() Function in details.