Doc #74828 [Com]: count() return values: incorrect "not ... or not"

From: Date: Sat, 01 Jul 2017 13:00:23 +0000
Subject: Doc #74828 [Com]: count() return values: incorrect "not ... or not"
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-14805@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 Comment by: peehaa@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: 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 … Previous Comments: ------------------------------------------------------------------------ [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 (#14805) next »