PHP Ctype function reference

WBOY
Release: 2016-07-25 08:57:28
Original
1067 people have browsed it
This article introduces the ctype function in PHP, which is used to detect string bodies. Friends in need can refer to it.

In the PHP programming language, the Ctype function is PHP's built-in string body testing function.

Mainly include the following types:

ctype_alnum -- Check for alphanumeric character(s) Check whether it only contains [A-Za-z0-9]

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 "nrt" 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 are 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 contains only printable characters that are not numbers/characters/spaces

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

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

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



Related labels:
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