Doc #74828 [Opn]: count() return values: incorrect "not ... or not"
| From: | cmb@php.net | Date: | Fri, 30 Jun 2017 11:03:21 +0000 |
| Subject: | Doc #74828 [Opn]: count() return values: incorrect "not ... or not" | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-14800@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74828&edit=1
ID: 74828
Updated by: cmb@php.net
Reported by: info at marcvangend dot nl
Summary: count() return values: incorrect "not ... or not"
Status: Open
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
I'm not a native speaker either, but I think it should be
If the parameter is neither an array nor an object â¦
Previous Comments:
------------------------------------------------------------------------
[2017-06-29 09:34:30] info at marcvangend dot nl
Description:
------------
The documentation for count(), under Return Values, says: "If the parameter is not an array or
not an object with implemented Countable interface, 1 will be returned." The "not ... or
not" is logically incorrect; it it were correct, count() would always return 1 because an array
is not an object with implemented Countable interface and vice versa.
I believe logically correct wordings would be (disclaimer, I'm not a native English speaker):
- If the parameter is not an array or an object with implemented Countable interface, 1 will be
returned.
- If the parameter is not an array and not an object with implemented Countable interface, 1 will be
returned.
- If the parameter is not an array nor an object with implemented Countable interface, 1 will be
returned.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74828&edit=1