Michael Southwell wrote:
ah, no, these answers are exactly right, given that $a is an integer, $b and $c are strings, and $d is unset. $b and $c when converted to integers for the purpose of comparison in #1 and #3 turn into 0 (zero) so the comparisons are true. #2 compares two different strings and so is false. #4 compares 0 to the integer of unset and so is true. #5 and #6 compare strings to the string of unset and so are false.
Yes, this is what PHP does. It's just that what PHP does is insane. It does not match any normal, logical thought process.
-- Elliotte Rusty Harold [EMAIL PROTECTED] Java I/O 2nd Edition Just Published! http://www.cafeaulait.org/books/javaio2/ http://www.amazon.com/exec/obidos/ISBN=0596527500/ref=nosim/cafeaulaitA/ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php