PHP strtoupper()Function
Examples
Convert all characters to uppercase:
<?php
echo strtoupper("Hello WORLD!");
?>
echo strtoupper("Hello WORLD!");
?>
Run example »
Definition and Usage
The strtoupper() function converts a string to uppercase.
Note:This function is binary-safe.
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
Syntax
strtoupper(string)
| Parameter | Description |
|---|---|
| string | Required. Specifies the string to convert. |
Technical Details
| Return value: | Returns the string converted to uppercase. |
|---|---|
| PHP Version: | 4+ |
PHP String Reference Manual Other Extensions