Created
August 21, 2022 21:45
-
-
Save hmhard/d21eee7ec9c81247ac0e023304203563 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$str="ሀልሕፙ፴"; | |
echo strlen($str); | |
echo "\n"; | |
echo strlen(utf8_decode($str)); | |
if (strlen($str) != strlen(utf8_decode($str))) { | |
echo "no"; | |
} else { | |
echo "yes"; | |
} | |
?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this PHP gist used to check whether a given string is English or not