$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
🎥 Join me live on YouTubePassionate about coding and teaching, I publish practical tutorials on PHP, Python, JavaScript, SQL, and web development. My goal is to make learning simple, engaging, and project‑oriented with real examples and source code.