![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
IntlChar::isalpha() function in PHP
The IntlChar::isalpha() function is used to check the given input is an alphanumeric character or not.
Syntax
IntlChar::isalpha( $val )
Parameters
val − An integer values or character encoded as a UTF-8 string.Required.
Return
The IntlChar::isalpha() function returns TRUE if the val is alphanumeric character.
Example
The following is an example −
<?php var_dump(IntlChar::isalpha("7")); echo "<br>"; var_dump(IntlChar::isalpha("M")); ?>
Output
The following is the output −
bool(false) bool(true)
Example
Let us see another example wherein we are checking for alphanumeric characters −
<?php var_dump(IntlChar::isalpha("Amit")); echo "<br>"; var_dump(IntlChar::isalpha("Jacob87876")); echo "<br>"; var_dump(IntlChar::isalpha("87876")); echo "<br>"; var_dump(IntlChar::isalpha("A")); ?>
Output
The following is the output −
NULL NULL NULL bool(true)
Advertisements