I think the best you'd get without some form of dictionary check would be something like this:
$formattedName = ucwords(strtolower($unformattedName));
Which would take, say, AaRoN DeBeeRS, to Aaron Debeers, which is better than nothing, although still not as good as Aaron DeBeers.
(Would also take 'aaron debeers' to 'Aaron Debeers')