note 2357 deleted from language.operators.comparison by sniper
| From: | sniper@php.net | Date: | Mon, 13 Oct 2003 00:15:33 +0000 |
| Subject: | note 2357 deleted from language.operators.comparison by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-58426@lists.php.net to get a copy of this message | ||
Note Submitter: sybernetix@bigfoot.com
----
Watch out very carefully for comparing results returned from functions you have written. I had a
function which either returned a string, or a numeric constant indicating failure. It so happened
that this numeric constant was 0, and so when php typecasted the string to an integer to do a
comparison, the comparison yielded true and the script thought it was always a failure being
returned.
So be careful!! :-)