Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
IntlChar::isalnum() function in PHP
The IntlChar::isalnum() function is used to check the given input is an alphanumeric character or not. The alphanumeric character is a digit or letter.
Syntax
bool IntlChar::isalnum(val)
Parameters
val − An integer values or character encoded as a UTF-8 string.
Return
The IntlChar::isalnum()function returns TRUE if the val is alphanumeric.
Example
The following is an example −
";
var_dump(IntlChar::isalnum("Jack Sparrow!"));
echo "
";
var_dump(IntlChar::isalnum("99"));
echo "
";
var_dump(IntlChar::isalnum("J"));
echo "
";
?>
Output
The following is the output −
NULL NULL NULL bool(true)
Example
Let us see another example −
";
var_dump(IntlChar::isalnum("1"));
?>
Output
The following is the output −
bool(false) bool(true)
Advertisements
