Re: why is '01' == '1.'?
| From: | Bart de Boer | Date: | Thu, 15 Dec 2005 15:03:03 +0000 |
| Subject: | Re: why is '01' == '1.'? | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-21233@lists.php.net to get a copy of this message | ||
Don't forget that one fundamental aspect of PHP is, that it's a web
language and thus receives most of its input from the web.
Therefore it usually only gets strings as input.
Consider ($_POST['intfield1'] == $_POST['intfield2'])
Both variables would be strings. Still if someone would input '01'
and '1.' you'd want this expression to return true.