Saturday, November 14, 2020

PHP | Character Functions

PHP Character Functions


Hello dear readers! welcome back to another edition of our tutorial on PHP. In this tutorial guide, we are going to be discussing about the PHP Character Functions.

PHP character functions checks whether a character or string falls into a certain character class according to the current locale.

Called with an integer argument, these functions acts exactly like their C counterparts from ctype.h.

Installation

Beginning with PHP 4.2.0, these functions are enabled by default and so do not require any form of Installation. For older versions you have to configure and compile PHP with --enable-ctype. You can disable the ctype support with --disable-ctype. Built-in support for ctype is available with PHP v 4.3.0.


Runtime Configuration

This PHP extension type has no configuration directives defined in php.in.

List of Character Functions

The following below is the list of character functions supported in PHP. PHP - indicates the earliest versions of PHP that have support for the functions.

Sr.NoFunction & DescriptionPHP
1ctype_alnum()

Check for alphanumeric character(s)

4.0.4
2ctype_alpha()

Check for alphabetic character(s)

4.0.4
3ctype_cntrl()

Check for control character(s)

4.0.4
4ctype_digit()

Check for numeric character(s)

4.0.4
5ctype_graph()

Check for any printable character(s) except space

4.0.4
6ctype_lower()

Check for lowercase character(s)

4.0.4
7ctype_print()

Check for printable character(s)

4.0.4
8ctype_punct()

Check for any printable character which is not whitespace or an alphanumeric character

4.0.4
9ctype_space()

Check for whitespace character(s)

4.0.4
10ctype_upper()

Check for uppercase character(s)

4.0.4
11ctype_xdigit()

Check for character(s) representing a hexadecimal digit

4.0.4

In our subsequent tutorials, we are going to be discussing about the above listed functions.


Alright guys! This is where we are rounding up for this tutorial post. In our next tutorial guide, we are going to be discussing about PHP ctype_alnum() Function.

Feel free to ask your questions where necessary and i will attend to them as soon as possible. If this tutorial was helpful to you, you can use the share button to share this tutorial.

Follow us on our various social media platforms to stay updated with our latest tutorials. You can also subscribe to our newsletter in order to get our tutorials delivered directly to your emails.

Thanks for reading and bye for now.
Share:

0 comments:

Post a Comment

Hello dear readers! Please kindly try your best to make sure your comments comply with our comment policy guidelines. You can visit our comment policy page to view these guidelines which are clearly stated. Thank you.