A whole grip of work was needlessly done here because the author wasn't aware of the Soundex, which PHP even has a native string function for: <a href="http://www.php.net/manual/en/function.soundex.php" rel="nofollow">http://www.php.net/manual/en/function.soundex.php</a><p>Interesting to see the way the author attacks a problem entirely out of his element, but as with anything, a little research ahead of time goes a long way.
If anyone is interested in detecting rhymes in lyrics, I built a lyric visualizer + analyzer a while ago.<p><a href="http://www.rappad.co/blueprints/1064" rel="nofollow">http://www.rappad.co/blueprints/1064</a><p>It goes a couple steps further to try to use the information to determine a "lyrical grade" of how poetic the song is.