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

From: Date: Wed, 27 Nov 2013 18:14:44 +0000
Subject: Re: echo count(false); == 1 ?!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-322517@lists.php.net to get a copy of this message
On Wed, Nov 27, 2013 at 1: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 > > > :-\ > http://us3.php.net/count The manual is a great place to figure out why things happen a certain way. Aziz

« previous php.general (#322517) next »