PHP: how to know that all letters in a string are upper case?

conditional-statements, php, string, uppercase

Solution

You can use strtoupper to convert your string to uppercase. You now know that it is uppercase, and you can check if the original string matches it.

ie.

$str === strtoupper($str)

Problem

How to know that all letters in a string are upper case?

Original source