Elliotte Harold wrote:
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.


A content-free emotive statement. It would be more accurate to say that it follows a set of principles you do not share, namely, weak typing. We would expect you as a java dude to prefer strong typing. Strong typing to me is inappropriate in a web layer, and reduces my productivity. Is it insane? No, just incompatible with my design goals and methods.

--
Kenneth Downs
Secure Data Software, Inc.
www.secdat.com    www.andromeda-project.org
631-689-7200   Fax: 631-689-0527
cell: 631-379-0010

_______________________________________________
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

Reply via email to