The IntlChar::isalpha() function is an inbuilt function in PHP which is used to check the given input is an alphanumeric character or not.
Syntax:
bool IntlChar::isalpha( $codepoint )
Paramters: The IntlChar::isalpha() function accept single parameter $codepoint which is mandotary. The input parameter is an integer values or character, which is encoded as a UTF-8 string.
Return Value: If $codepoint is an alphanumeric character then it return True, otherwise return False.
Below programs illustrate the IntlChar::isalpha() function in PHP:
Program 1:
<?php // PHP code to illustrate IntlChar::isalpha() // function // Input data is character type var_dump(IntlChar::isalpha("G")); // Input data is string type var_dump(IntlChar::isalpha("G\n")); // Input data is string type var_dump(IntlChar::isalpha("Geeksforgeeks")); // Input data is number var_dump(IntlChar::isalpha("2018")); // Input data is single digit var_dump(IntlChar::isalpha("5")); ?> |
Output:
bool(true) NULL NULL NULL bool(false)
Program 2:
<?php // PHP code to illustrate isbase() // Declare an array $arr $arr = array("G", "GeeksforGeeks", "^", "1001", "6", "\u{2018}"); // Loop run for every array element foreach ($arr as $val){ // Check each element as code point data var_dump(IntlChar::isalpha($val)); } ?> |
Output:
bool(true) NULL bool(false) NULL bool(false) bool(false)
Related Articles:
- PHP | IntlChar::isdigit() Function
- PHP | IntlChar::isblank() Function
- PHP | IntlChar::isbase() Function
Reference: http://php.net/manual/en/intlchar.isalpha.php
Recommended Posts:
- How to Check a Function is a Generator Function or not using JavaScript ?
- How to call a function that return another function in JavaScript ?
- How to get the function name inside a function in PHP ?
- How to get the function name from within that function using JavaScript ?
- p5.js | day() function
- p5.js | pow() function
- p5.js | sq() function
- p5.js | int() function
- p5.js | abs() function
- CSS | url() Function
- p5.js | log() function
- p5.js | str() function
- p5.js | hex() function
- D3.js now() function
- CSS | var() Function
- PHP | each() Function
- p5.js | min() function
- p5.js | red() function
- p5.js | tan() function
- p5.js | sin() function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

