Some of the powerful string handling functions that PHP has forgotten
List several forgotten in the PHP language but very powerful string processing functions, here is not the use of an example, interested friends can test themselves.
(PHP 4 >= 4.0.4, PHP 5)
Function prototype bool Ctype_alnum (string text)
Ctype_alnum--Check for alphanumeric character (s)
Detects if it contains only [a-za-z0-9]
Function prototype bool Ctype_alpha (string text)
Ctype_alpha--Check for alphabetic character (s)
Detects if it contains only [a-za-z]
Ctype_cntrl--Check for control character (s)
Check if it is a character control character that contains only the class "\r\b\t"
Ctype_digit--Check for numeric character (s)
Check time 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 that contains only characters that can be printed (except for spaces)
Ctype_lower--Check for lowercase character (s)
Check if all characters are English letters and are lowercase
Ctype_print--Check for printable character (s)
Check if it is a string containing only the characters that can be printed
CTYPE_PUNCT--Check for any printable character which are not whitespace or an alphanumeric character
Check if it is a printable character that contains only non-digits/characters/spaces
Ctype_space--Check for whitespace character (s)
Check if it is a character and space that contains only classes such as "\r\b\t"
Ctype_upper--Check for uppercase character (s)
Check if all characters are in English letters and are all uppercase
Ctype_xdigit--Check for character (s) representing a hexadecimal digit
Check if it is a 16 binary string and can only include "0123456789abcdef"
Articles you may be interested in
- String processing function in PHP (string Functions) Full summary
- PHP Filter String functions
- PHP restricts regular expressions that can only enter English characters and numbers
- Image magnification display effects Slimbox The most lightweight features of the most powerful jquery image amplification effect
- PHP calculates a function that is currently the first week of the year or January
- PHP's most accurate string-length intercept function
- PHP Performance Optimizations: Use Isset () to determine string length faster than strlen ()
- PHP calculates the number of days (day) of a two-date function
http://www.bkjia.com/PHPjc/895888.html www.bkjia.com true http://www.bkjia.com/PHPjc/895888.html techarticle some of the powerful string handlers that PHP has forgotten enumerate some of the forgotten, but very powerful, string-handling functions in the PHP language, which are not used in a few ways ...