Search Results
See Also ¶ ctype_alpha () - Check for alphabetic character (s) ctype_lower () - Check for lowercase character (s) setlocale () - Set locale information IntlChar::isupper () - Check if code point has the general category "Lu" (uppercase letter)
Definition and Usage The toupper() function returns the ASCII value of an uppercase version of the character. If the character is not an uppercase character then its value is returned without being changed. The toupper() function is defined in the <ctype.h> header file.
- Return Value
- Example 1
- Example 2
- Example 3
This function returns "true" if every character in the text is a uppercase letter, and "false" otherwise.
If every character in the provided string (or text) is a uppercase letter, the PHP ctype_upper()function returns true −
If every character in the provided string (or text) is not a uppercase letter, the PHP ctype_upper() function returns false−
Checking multiple strings (texts). In the example below, we create an array of a string containing multiple strings and, using the PHP ctype_upper()function to determine whether every character in strings is in uppercase −
Jul 11, 2025 · The ctype_upper () function in PHP used to check each and every character of a given string is in uppercase or not. If the string in upper case then it returns TRUE otherwise returns False.
Aug 15, 2025 · The ctype_upper() function is a valuable asset in the PHP developer's toolkit. Its simplicity, efficiency, and specific purpose make it ideal for many string validation tasks, particularly when working with data that must adhere to strict uppercase formatting rules.
What is the ctype_upper method in PHP? The ctype_upper method can be used to check if all the text characters are in uppercase alphabetical characters. The uppercase alphabetical characters include A-Z.
People also ask
What is toupper() function in C Ctype library?
What does Ctype_upper do?
Does test12345 have all uppercase characters?
How do I check if a string is uppercase?
Examples of ctype_upper. Info and examples on ctype_upper PHP Function
