Created
September 8, 2017 00:28
-
-
Save ruslanashaari/08c7e68037884da8103c7d697492bfc1 to your computer and use it in GitHub Desktop.
Check if a string is a pangram or not #exercism
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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