On Sun, October 3, 2010 12:34 pm, Gustavo Lopes wrote:
> * The current behavior for >, <, etc. is completely useless. It's
> unpredictable and it doesn't even establish a total order:
>
> $a = new stdclass;
> $a->prop = null;
> $b = new stdclass;
> $b->prop2 = null;
>
> var_dump($a > $b); //false
> var_dump($a == $b); //false
> var_dump($b > $a); //false

Errrr.

Which one of these would you expect to be "true"?...

They're sure not equal, right?

And what would make $a or $b "greater" than the other? I mean, *WHY*
would you expect one of those to be "true", if you do expect one of
them to be "true"?

I sure can't find any logical a priori ordering, total, partial, or
otherwise.

Last time I checked, there was no "rule" that any set/graph or other
mathematical collection had to have a defined ordering, even partial.

But it's been ages since I got my Honors Math degree, so maybe they
changed the rule while I wasn't looking... :-)

-- 
brain cancer update:
http://richardlynch.blogspot.com/search/label/brain%20tumor
Donate:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FS9NLTNEEKWBE



-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to