With a regex, you can do this, but it is not optimal and does not work at all, @hjpotter, if from much faster:
var_dump(strlen(preg_replace('~[^az]|(.)(?=.*\1)~i', '', $str)) == 26);
It removes all non-letter characters, all duplicate letters (case insensitive) and compares the string length with 26.
[^az] matches any letter character(.) captures a letter in group 1(?=.*\1) checks if the same letter is somewhere else (on the right)- Modifier i makes case insensitive
Casimir et Hippolyte
source share