rfc:inconsistent-behaviors
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:inconsistent-behaviors [2014/02/05 21:45] – sanfordwhiteman | rfc:inconsistent-behaviors [2021/03/27 14:31] (current) – Move to inactive ilutov | ||
---|---|---|---|
Line 4: | Line 4: | ||
* Date: 2014-01-08 | * Date: 2014-01-08 | ||
* Author: Yasuo Ohgaki < | * Author: Yasuo Ohgaki < | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
* Renamed to: https:// | * Renamed to: https:// | ||
Line 25: | Line 25: | ||
Type juggling only works for INTEGER or HEX like strings. | Type juggling only works for INTEGER or HEX like strings. | ||
+ | |||
+ | Most problematic is HEX like strings being auto-coerced during | ||
+ | comparison, but using //different rules// from manual casting. That | ||
+ | is, ( 0x0A == " | ||
+ | although " | ||
+ | |||
+ | This despite http:// | ||
+ | states clearly that for number-string comparison, we " | ||
+ | strings and resources to numbers." | ||
+ | string patterns cannot be " | ||
+ | a " | ||
+ | casting for the same string. It is hard to view it is anything but a | ||
+ | bug that it does not. | ||
=== HEX === | === HEX === | ||
Line 285: | Line 298: | ||
https:// | https:// | ||
+ | |||
+ | |||
+ | |||
+ | ==== filter_var ==== | ||
+ | |||
+ | https:// | ||
+ | |||
+ | <code php> | ||
+ | var_dump(filter_var(' | ||
+ | var_dump(filter_var(' | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | bool(false) | ||
+ | double(1) | ||
+ | </ | ||
Line 303: | Line 332: | ||
http:// | http:// | ||
+ | |||
+ | |||
rfc/inconsistent-behaviors.1391636744.txt.gz · Last modified: 2017/09/22 13:28 (external edit)