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::iscntrl() function in PHP
The IntlChar::iscntrl() function is used to check the given input is a control character or not. Examples include line feed (
), tab (\t), etc.
Syntax
IntlChar::iscntrl( val )
Parameters
val − An integer values or character encoded as a UTF-8 string.
Return
The IntlChar::iscntrl() function returns TRUE if the val is a control character.
Example
The following is an example −
")); echo "
"; var_dump(IntlChar::iscntrl("ahjh")); echo "
"; var_dump(IntlChar::iscntrl("12345")); ?>
Output
The following is the output −
bool(true) NULL NULL
Example
Let us now see another example wherein we are checking whether the entered value is a control character or not −
";
var_dump(IntlChar::iscntrl("878"));
echo "
";
?>
Output
The following is the output −
bool(true) NULL
Advertisements
