Skip to content

Instantly share code, notes, and snippets.

@ruslanashaari
Created September 8, 2017 00:28
Show Gist options
  • Save ruslanashaari/08c7e68037884da8103c7d697492bfc1 to your computer and use it in GitHub Desktop.
Save ruslanashaari/08c7e68037884da8103c7d697492bfc1 to your computer and use it in GitHub Desktop.
Check if a string is a pangram or not #exercism
<?php
function isPangram($param) {
$sentences = strtolower(trim($param));
$letters = str_split("thequickbrownfoxjumpsoverthelazydog");
foreach ($letters as $letter) {
if (!strstr($sentences, $letter))
return false;
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment