| This article introduces the CType function in PHP, for the detection function of the string body, a friend of the need to refer to the next bar. In the PHP programming language, the CType function is a PHP built-in string body test function. The main types are as follows: Ctype_alnum-Check for alphanumeric character (s) detects if it contains only [a-za-z0-9] Ctype_alpha-Check for alphabetic character (s) detects if it contains only [a-za-z] Ctype_cntrl-Check for control character (s) checks if it is a character control character that contains only the class "\n\r\t" Ctype_digit--Check for numeric character (s) is a string containing only numeric characters (0-9) Ctype_graph--Check for any printable character (s) except space check if it is a string containing only characters that can be printed (except spaces) Ctype_lower-Check for lowercase character (s) checks if all characters are English letters and are lowercase Ctype_print--Check for printable character (s) checks if it is a string containing only characters that can be printed CTYPE_PUNCT--Check for any printable character which are not whitespace or an alphanumeric character check if it is printable that contains only non-digits/characters/spaces Out of character Ctype_space--Check for whitespace character (s) checks if it is a character and space that contains only the class "" Ctype_upper-Check for uppercase character (s) checks if all characters are English letters and are in uppercase Ctype_xdigit--Check for character (s) representing a hexadecimal digit check if it is a 16 binary string and can only include "0123456789abcdef" |