PHP strtoupper() Function

The strtoupper() function converts a string to uppercase.

Related functions:

  • strtolower() - converts a string to lowercase
  • lcfirst() - converts the first character of a string to lowercase
  • ucfirst() - converts the first character of a string to uppercase
  • ucwords() - converts the first character of each word in a string to uppercase
string strtoupper ( string $string )

Returns string with all alphabetic characters converted to uppercase.

Note that 'alphabetic' is determined by the current locale. For instance, in the default "C" locale characters such as umlaut-a (รค) will not be converted.

Example -

ParameterDescription
stringRequired. Specifies the string to convert

Returns the uppercased string.