What\'s the best way to see if a string contains all capital letters? I still want the function to return true if the string also contains symbols or numbers.
Check whether strtoupper($str) == $str
strtoupper($str) == $str
To handle non-ascii use:
mb_strtoupper($str, 'utf-8') == $str