php-katas-with-pest/src/Pangram.php
2020-07-12 16:56:40 +01:00

15 lines
297 B
PHP

<?php
declare(strict_types=1);
namespace App;
function isPangram(string $input): bool
{
$split = str_split($input);
$lower = array_map('strtolower', $split);
$filtered = array_filter($lower, fn(string $letter) => $letter != ' ');
return count(array_unique($filtered)) == 26;
}