Home > Backend Development > PHP Tutorial > Some powerful string processing functions that PHP has forgotten_PHP Tutorial

Some powerful string processing functions that PHP has forgotten_PHP Tutorial

WBOY
Release: 2016-07-13 10:16:54
Original
744 people have browsed it

Some forgotten and powerful string processing functions in PHP

It would be wrong to list some forgotten but very powerful string processing functions in the PHP language. Examples of its usage are given one by one, and interested friends can test it themselves.

(PHP 4 >= 4.0.4, PHP 5)

Function prototype bool ctype_alnum ( string text )
ctype_alnum -- Check for alphanumeric character(s)
Check whether it only contains [A-Za-z0-9]

Function prototype bool ctype_alpha ( string text )
ctype_alpha -- Check for alphabetic character(s)
Check if it only contains [A-Za-z]

ctype_cntrl -- Check for control character(s)
Check whether it only contains character control characters whose class is "rbt" and so on

ctype_digit -- Check for numeric character(s)
When checking, it 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 printable characters (except spaces)

ctype_lower -- Check for lowercase character(s)
Check if all characters are English letters and all lowercase

ctype_print -- Check for printable character(s)
Check if it is a string containing only characters that can be printed

ctype_punct -- Check for any printable character which is not whitespace or an alphanumeric character
Check if it is a printable character containing only non-digits/characters/spaces

ctype_space -- Check for whitespace character(s)
Check whether it only contains characters such as "rbt" and spaces

ctype_upper -- Check for uppercase character(s)
Check if all characters are English letters and all uppercase

ctype_xdigit -- Check for character(s) representing a hexadecimal digit
Check whether it is a hexadecimal string, which can only include "0123456789abcdef"

Articles you may be interested in

  • String Functions in PHP Full summary
  • php filter string function
  • php restricts regular expressions that can only enter English characters and numbers
  • Image enlargement display special effect slimbox is the most lightweight and powerful one Jquery image enlargement effect
  • php function to calculate the current week of the year or month
  • php’s most accurate string length interception function
  • php performance optimization: Using isset() to determine the string length is faster than strlen()
  • php function to calculate the number of days (days) between two dates

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/895888.htmlTechArticleSome powerful string processing functions that have been forgotten in php. List some forgotten functions in the php language. Very powerful string processing function, I won’t give an example of its usage here...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template