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
1.4m articles
1.4m replys
5 comments
57.0k users