I actually do a lot of lexicographical comparison with ISO8601 date strings. I also have numerical string comparisons, but the truth is I didn't think they would be cast to integers so that is a potential bug in my code. When I use < on strings I expect that they will both compare as strings. In other places, I explicitly cast one or both operands to integers or float. I do see the problem that many people could use < and > on strings expecting numerical comparison, but I believe most people expect lexicographical comparison like me.
- Re: [PHP-DEV] Don't compare zero exponentials in strin... Ben Ramsey
- Re: [PHP-DEV] Don't compare zero exponentials in strin... Stanislav Malyshev
- Re: [PHP-DEV] Don't compare zero exponentials in ... Christian Schneider
- Re: [PHP-DEV] Don't compare zero exponentials... Kamil Tekiela
- Re: [PHP-DEV] Don't compare zero exponent... Christian Schneider
- Re: [PHP-DEV] Don't compare zero exponent... Ben Ramsey
- Re: [PHP-DEV] Don't compare zero expo... Rowan Tommins
- Re: [PHP-DEV] Don't compare zero expo... Christian Schneider
- Re: [PHP-DEV] Don't compare zero... Nikita Popov
- Re: [PHP-DEV] Don't compare ... Nikita Popov
- Re: [PHP-DEV] Don't compare ... Kamil Tekiela
- Re: [PHP-DEV] Don't compare ... Rowan Tommins
- Re: [PHP-DEV] Don't compare ... Nikita Popov
- Re: [PHP-DEV] Don't compare ... Rowan Tommins
- [PHP-DEV] Re: Don't compare zero exponentials in strin... Nikita Popov