You've missed out the 7 as an option on the leet_replace['t'] on line 118. This means one of your examples doesn't even get picked up!