
- PHP Tutorial
- PHP - Home
- PHP - Introduction
- PHP - Environment Setup
- PHP - Syntax Overview
- PHP - Variable Types
- PHP - Constants
- PHP - Operator Types
- PHP - Decision Making
- PHP - Loop Types
- PHP - Arrays
- PHP - Strings
- PHP - Web Concepts
- PHP - GET & POST
- PHP - File Inclusion
- PHP - Files & I/O
- PHP - Functions
- PHP - Cookies
- PHP - Sessions
- PHP - Sending Emails
- PHP - File Uploading
- PHP - Coding Standard
- Advanced PHP
- PHP - Predefined Variables
- PHP - Regular Expression
- PHP - Error Handling
- PHP - Bugs Debugging
- PHP - Date & Time
- PHP & MySQL
- PHP & AJAX
- PHP & XML
- PHP - Object Oriented
- PHP - For C Developers
- PHP - For PERL Developers
- PHP Form Examples
- PHP - Form Introduction
- PHP - Validation Example
- PHP - Complete Form
- PHP login Examples
- PHP - Login Example
- PHP - Facebook Login
- PHP - Paypal Integration
- PHP - MySQL Login
- PHP AJAX Examples
- PHP - AJAX Search
- PHP - AJAX XML Parser
- PHP - AJAX Auto Complete Search
- PHP - AJAX RSS Feed Example
- PHP XML Example
- PHP - XML Introduction
- PHP - Simple XML
- PHP - Simple XML GET
- PHP - SAX Parser Example
- PHP - DOM Parser Example
- PHP Frame Works
- PHP - Frame Works
- PHP - Core PHP vs Frame Works
- PHP Design Patterns
- PHP - Design Patterns
- PHP Function Reference
- PHP - Built-In Functions
- PHP Useful Resources
- PHP - Questions & Answers
- PHP - Useful Resources
- PHP - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
PHP - Character Functions
The functions provided by this extension check whether a character or string falls into a certain character class according to the current locale.
When called with an integer argument these functions behave exactly like their C counterparts from ctype.h
Installation
Beginning with PHP 4.2.0 these functions are enabled by default. For older versions you have to configure and compile PHP with --enable-ctype. You can disable ctype support with --disable-ctype.
Builtin support for ctype is available with PHP 4.3.0.
Runtime Configuration
This extension has no configuration directives defined in php.ini.
List of Functions
PHP − indicates the earliest version of PHP that supports the function.
Sr.No | Function & Description | PHP |
---|---|---|
1 | ctype_alnum()
Check for alphanumeric character(s) |
4.0.4 |
2 | ctype_alpha()
Check for alphabetic character(s) |
4.0.4 |
3 | ctype_cntrl()
Check for control character(s) |
4.0.4 |
4 | ctype_digit()
Check for numeric character(s) |
4.0.4 |
5 | ctype_graph()
Check for any printable character(s) except space |
4.0.4 |
6 | ctype_lower()
Check for lowercase character(s) |
4.0.4 |
7 | ctype_print()
Check for printable character(s) |
4.0.4 |
8 | ctype_punct()
Check for any printable character which is not whitespace or an alphanumeric character |
4.0.4 |
9 | ctype_space()
Check for whitespace character(s) |
4.0.4 |
10 | ctype_upper()
Check for uppercase character(s) |
4.0.4 |
11 | ctype_xdigit()
Check for character(s) representing a hexadecimal digit |
4.0.4 |