The strtoupper Function
The strtoupper function converts
a string to uppercase. It works correctly only
with Latin characters (single-byte characters).
Syntax
strtoupper(string $string): string
Example
Let's convert a string to uppercase:
<?php
echo strtoupper('abcde');
?>
Code execution result:
'ABCDE'
See Also
-
the
strtolowerfunction,
which converts a string to lowercase -
the
ucfirstfunction,
which converts the first character to uppercase -
the
lcfirstfunction,
which converts the first character to lowercase -
the
ucwordsfunction,
which converts the first letters of words to uppercase