go to bug id or search bugs for
From manual page: http://www.php.net/function.soundex
No mention that it returns FALSE on failure.
Add a Patch
Add a Pull Request
...which only happens if the string is empty.
Or a 0, or false, or null.
Or, if it gets an array (but only an array), it emits a warning and returns NULL.
There are plenty of ways bad data can be passed to a function, return types should be consistent and documented.
> Note: If the parameters given to a function are not what it expects, such as passing an array where a string is
> expected, the return value of the function is undefined. In this case it will likely return NULL but this is just a
> convention, and cannot be relied upon.
Then why bother specifying return value(s) upon failure on other functions?
Because accidentally trying to soundex an empty string (or something convertable to a string) is understandable but calling it with an array doesn't make sense and suggests possible developer error?