PHP strtoupper() Function

The strtoupper() function in PHP is used to convert a string to uppercase.

This function is binary-safe. The related functions are as follows:

  • strtolower()
  • lcfirst()
  • ucfirst()
  • ucwords()

Syntax

Parameter

string(required)– This parameter represents the input string.

Return

This function returns a string with all alphabetic characters converted to uppercase.

Example 1

Output

Example 2

Output

Example 3

Output