Re: $string != $array should throw a warning!
| From: | Andi Gutmans | Date: | Tue, 28 Dec 1999 16:54:07 +0000 |
| Subject: | Re: $string != $array should throw a warning! | ||
| References: | 1 | Groups: | php.dev php.version4 |
| Request: | Send a blank email to php-dev+get-14090@lists.php.net to get a copy of this message | ||
Yeah they should be bool in my opinion too. How about entering it in
bugs.php.net/version4 so that we remember to fix it.
Andi
On Tue, 28 Dec 1999, Thies C. Arntzen wrote:
> <?
> error_reporting(-1);
> $a = array();
> $b = "hallo";
>
> var_dump($a != $b);
> var_dump($a == $b);
> var_dump($a === $b);
> ?>
>
> outputs:
> X-Powered-By: PHP/4.0b4-dev
> Content-Type: text/html
>
> string(0) ""
> string(0) ""
> bool(false)
>
> i really think this *should* output:
>
> bool(true);
> bool(false);
> bool(false);
>
> or spit a warining in case 1 & 2!
>
> question is:
> - do we want the warning? or
> - can we decide on a string being bigger or smaller than an object/array
> (and implement that in compare_function())
>
>
> tc
>
>
>