Skip to content

Instantly share code, notes, and snippets.

@hmhard
Created August 21, 2022 21:45
Show Gist options
  • Save hmhard/d21eee7ec9c81247ac0e023304203563 to your computer and use it in GitHub Desktop.
Save hmhard/d21eee7ec9c81247ac0e023304203563 to your computer and use it in GitHub Desktop.
<?php
$str="ሀልሕፙ፴";
echo strlen($str);
echo "\n";
echo strlen(utf8_decode($str));
if (strlen($str) != strlen(utf8_decode($str))) {
echo "no";
} else {
echo "yes";
}
?>
@hmhard
Copy link
Author

hmhard commented Aug 21, 2022

this PHP gist used to check whether a given string is English or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment