]> granicus.if.org Git - php/commit
Don't return false for empty string in soundex()
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 22 Sep 2020 09:42:50 +0000 (11:42 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 22 Sep 2020 09:44:35 +0000 (11:44 +0200)
commitaba0ee71b224ab11a4b940f06dd1146eddbd41a3
tree27b77a7601f73d53f4e2ee9a9a37993ffaa65d97
parentf26d855e2908c840e87ce62ae73abf8f0608602f
Don't return false for empty string in soundex()

Return "0000" instead of false to have a consistent return type.
"0000" is already a possible return value if the string doesn't
contain any letters, such as with soundex(" "). We can treat the
case of soundex("") exactly the same.
ext/opcache/Optimizer/zend_func_info.c
ext/standard/basic_functions.stub.php
ext/standard/basic_functions_arginfo.h
ext/standard/soundex.c
ext/standard/tests/strings/soundex.phpt