Re: echo count(false); == 1 ?!

From: Date: Wed, 27 Nov 2013 18:14:42 +0000
Subject: Re: echo count(false); == 1 ?!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-322516@lists.php.net to get a copy of this message
Just think about it. When was the last time you counted something and the result was false? It makes no sense. Logically counting should return negative, 0 or positive value. On Wed, Nov 27, 2013 at 7:04 PM, Daevid Vincent <daevid@daevid.com> wrote: > Really? 1?? I would have expected 0 or false or something other than > positive. *sigh* > > $ php -a > php > echo count(false); > 1 > > > :-\ >

« previous php.general (#322516) next »