Re: cvs: qaweb / buildtest-action.php
| From: | Andrey Hristov | Date: | Mon, 26 Aug 2002 09:50:38 +0000 |
| Subject: | Re: cvs: qaweb / buildtest-action.php | ||
| References: | 1 2 3 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-5885@lists.php.net to get a copy of this message | ||
Okay count(array()) is 0 but count(var_export(array(),TRUE)); is 1
C:\apache\php>php
<?php
var_dump(count(var_export(array(),TRUE)));
?>
^Z
int(1)
Andrey
----- Original Message -----
From: "Jan Lehnardt" <jan@php.net>
To: <php-qa@lists.php.net>
Sent: Monday, August 26, 2002 12:47 PM
Subject: Re: [PHP-QA] cvs: qaweb / buildtest-action.php
> Hi,
> On Mon, Aug 26, 2002 at 12:28:33PM +0300, Andrey Hristov wrote:
> > count() returns int(1) on every variable that is set. So in this case
> > count() is made not on array but on string. This always will be int(1).
> jan@dahlia /mnt/data/cvs/php4/sapi/cli> ./php -r '$i =array(); echo
count($i);'
> 0jan@dahlia /mnt/data/cvs/php4/sapi/cli>
> so?
>
> Jan
> --
> Q: Thank Jan? A: http://geschenke.an.dasmoped.net/
> Got an old and spare laptop? Please send me a mail.
>
> --
> PHP Quality Assurance Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>