- array_intersect: documentation ( source)
- preg_split: documentation ( source)
- range: documentation ( source)
<?php
declare(strict_types = 1);
function isPangram($string)
{
$string = preg_split('//u', $string);
$range = range('a', 'z');
return count(array_intersect($range, $string)) === count($range);
}
echo isPangram('the quick brown fox jumps over the lazy dog');