Well again, its going to be a LOT of work.
I had a quick glance, I have an old little dictionary, from when I was about 12, its got about 3500 words.
The only way I can see to do it is if statements...
if ($word == freind) || ($word == fiend) || ($word == firend)
{echo "Is that Friend"};
But that would take a VERY long time. Wouldn't it be better to use a spell checker in word or something, even hotmal has a spell checker. I mean if depends what you want to do, and PHP may already have a function you can use, but your looking at a massive task whatever in my opinion 🙂
If you do want to, look for a preexisting fuction, or more likely, a prewritten script!
I wrote a massive php file to do a task after realising that Javascript wasn't good enough, this 10k PHP file was slow and didn't work well, I then realised a better way, its 3k, and works better.