Created
April 8, 2016 04:24
-
-
Save TheRealJAG/3d3ba9bff8dbce5577e6efcdeb0083f5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
class AreAnagrams | |
{ | |
public static function areStringsAnagrams($a, $b) | |
{ | |
return(count_chars($a, 1) == count_chars($b, 1)); | |
} | |
} | |
// For testing purposes (do not submit uncommented): | |
/* | |
echo AreAnagrams::areStringsAnagrams('momdad', 'dadmom') ? 'True' : 'False'; | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment