Skip to content

Instantly share code, notes, and snippets.

@zachflower
Created June 13, 2014 01:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zachflower/00694ece13e481be453e to your computer and use it in GitHub Desktop.
Save zachflower/00694ece13e481be453e to your computer and use it in GitHub Desktop.
PHP function to determine whether or not two strings are anagrams.
<?php
function is_anagram($a, $b) {
return(count_chars($a, 1)==count_chars($b, 1));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment