RE: [PHP] A really wacky design decision
| From: | Andrea Giammarchi | Date: | Tue, 06 Oct 2009 08:24:04 +0000 |
| Subject: | RE: [PHP] A really wacky design decision | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-298638@lists.php.net to get a copy of this message | ||
> but is implicitly converted into strings when it is entered.
use floatVal($str1) === floatVal($str2) then ... I honestly cannot spot any problem in what you
wanna do, I can just spot an error in the root of the process: threat strings as numbers, comparing
potatoes and tomatoes ...
there are filters used for validation as well in php, maybe those filters, hopefully faster than
PCRE, could help you to understand if a string is a number, or not.
Regards
_________________________________________________________________
Keep your friends updated—even when you’re not signed in.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_5:092010