"Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > The integer 0 is equal to False, but not Null. > > Not quite true. 0 evaluates to false. They are not equal. Try this: [...] > So be careful and try to think of 0 and false as distinct and separate > entities and you will avoid coding mistakes like this.
Is this seen as a strength or a weakness of PHP.? In C(++), direct comparisons to true/false are discouraged. In other words, instead of this: bool x; if(x==true) ... if(x==false) ... itt's always considered better to do this: if(x) ... if(!x) ... But PHP seems to require a direct comparison with false in certain situations. Are there any cases where you need to do a direct comparison with true? Are you coming to Ottawa in the future? -- John A. Grant * I speak only for myself * (remove 'z' to reply) Radiation Geophysics, Geological Survey of Canada, Ottawa If you followup, please do NOT e-mail me a copy: I will read it here -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]