There is some discrepency
with respect to how the metaphone algorithm actually works. For
instance, there is a version in the Java Apache Commons library.
There is a version provided within PHP. These do not provide the same
results. On the questionable theory that the implementation in PHP
is probably more well known, this code should match it in output.
This implementation is based on a Javascript implementation which is
itself based on the PHP internal implementation.
The variable maxCodeLen
is the limit on how long the returned
metaphone should be.