$var="\n\e\t\v";
if(ctype_cntrl($var)){
echo " All are control characters ";
}else{
echo "All or some are not control characters ";
}
Output is here
All are control characters
Syntax
bool ctype_cntrl ( string $input_string )
$input_string : String to be checked. $input_string are control characters or not. Any thing other than this if present then it return FALSE.
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.