Re: [RFC] [VOTE] Counting of non-countable objects

From: Date: Tue, 25 Oct 2016 18:41:56 +0000
Subject: Re: [RFC] [VOTE] Counting of non-countable objects
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-96610@lists.php.net to get a copy of this message
Hi Dan, On 23 October 2016 at 13:49, Dan Ackroyd <danack@basereality.com> wrote: > > When you update the manual, please can you explicitly what is allowed, > rather than just saying what is not allowed as per the RFC text. > > The manual already says what is allowed: *"Parameters: array_or_countable An array or Countable object."* Under the "Return Values" section there is sentence about the current implementation: *"If the parameter is not an array or not an object with implemented Countable interface, 1 will be returned. There is one exception, if array_or_countable is NULL, 0 will be returned."* I suggest we extend the "Return Values" section to say that a warning is raised, but I don't see any need to change the manual beyond that. Unless I have misunderstood you?

« previous php.internals (#96610) next »