Date: 12/28/99
- Next message: Kevin Shallow: "[PHP-DEV] php3_module_entry"
- Previous message: atlee <email protected>: "[PHP-DEV] PHP 4.0 Bug #3059: print <<<EOF doesn't parse \n correctly"
- In reply to: Andi Gutmans: "Re: [PHP-DEV] $string != $array should throw a warning!"
- Next in thread: Andi Gutmans: "Re: [PHP-DEV] $string != $array should throw a warning!"
- Reply: Andi Gutmans: "Re: [PHP-DEV] $string != $array should throw a warning!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, 28 Dec 1999, Andi Gutmans wrote:
> 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,
the fix is too easy to put it in bugdb, question is how do we want to fix
it:
a) spit a warning in compare-function & still return var_reset()?
b) decide if array > string or vice versa
just have a quick look at compare_function and you'll see what i mean.
as the current behaviour is undefined i'd go for b) and declare "Array >
string" (that was choosen by random), 'cause i don't like the idea of an
basic operator to spit a warning.
comments?
tc
>
> 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
> >
> >
> >
>
>
Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
Digital Collections Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93 20097 Hamburg / Germany
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Kevin Shallow: "[PHP-DEV] php3_module_entry"
- Previous message: atlee <email protected>: "[PHP-DEV] PHP 4.0 Bug #3059: print <<<EOF doesn't parse \n correctly"
- In reply to: Andi Gutmans: "Re: [PHP-DEV] $string != $array should throw a warning!"
- Next in thread: Andi Gutmans: "Re: [PHP-DEV] $string != $array should throw a warning!"
- Reply: Andi Gutmans: "Re: [PHP-DEV] $string != $array should throw a warning!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

