Doc #74828 [Opn->Csd]: count() return values: incorrect "not ... or not"

From: Date: Tue, 18 Jul 2017 13:32:35 +0000
Subject: Doc #74828 [Opn->Csd]: count() return values: incorrect "not ... or not"
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-14852@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: peehaa@php.net Reported by: info at marcvangend dot nl Summary: count() return values: incorrect "not ... or not" -Status: Open +Status: Closed Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant -Assigned To: +Assigned To: peehaa Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2017-07-18 13:32:17] peehaa@php.net Automatic comment from SVN on behalf of peehaa Revision: http://svn.php.net/viewvc/?view=revision&revision=342677 Log: Fixed wording of return value. Fixes #74828 ------------------------------------------------------------------------ [2017-07-01 13:00:21] peehaa@php.net Works for me. Might as well change if to when now we are nitpicking anyway :-) When the parameter is neither an array nor an object … ------------------------------------------------------------------------ [2017-06-30 11:03:18] cmb@php.net I'm not a native speaker either, but I think it should be If the parameter is neither an array nor an object … ------------------------------------------------------------------------ [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

« previous php.doc.bugs (#14852) next »