Doc #76314 [Com]: Specify failure return type for soundex
| From: | roy-orbison at devo dot net dot au | Date: | Wed, 09 May 2018 01:40:50 +0000 |
| Subject: | Doc #76314 [Com]: Specify failure return type for soundex | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-15670@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76314&edit=1
ID: 76314
Comment by: roy-orbison at devo dot net dot au
Reported by: roy-orbison at devo dot net dot au
Summary: Specify failure return type for soundex
Status: Open
Type: Documentation Problem
Package: Strings related
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2018-05-09 01:31:56] requinix@php.net
...which only happens if the string is empty.
------------------------------------------------------------------------
[2018-05-09 01:25:05] roy-orbison at devo dot net dot au
Description:
------------
---
From manual page: http://www.php.net/function.soundex
---
No mention that it returns FALSE on failure.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76314&edit=1