rfc:string_to_number_comparison
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:string_to_number_comparison [2020/07/15 08:28] – nikic | rfc:string_to_number_comparison [2020/07/31 12:55] (current) – nikic | ||
---|---|---|---|
Line 2: | Line 2: | ||
* Date: 2019-02-26 | * Date: 2019-02-26 | ||
* Author: Nikita Popov < | * Author: Nikita Popov < | ||
- | * Status: | + | * Status: |
* Target Version: PHP 8.0 | * Target Version: PHP 8.0 | ||
* Implementation: | * Implementation: | ||
Line 118: | Line 118: | ||
// Before | After | Type | // Before | After | Type | ||
var_dump(42 == " | var_dump(42 == " | ||
- | var_dump(42 == " | + | var_dump(42 == " |
var_dump(42 == " | var_dump(42 == " | ||
var_dump(42 == " | var_dump(42 == " | ||
var_dump( 0 == " | var_dump( 0 == " | ||
+ | // (*) Becomes well-formed if saner numeric strings RFC passes | ||
</ | </ | ||
- | A notable asymmetry under the new semantics is that '' | + | A notable asymmetry under the new semantics is that '' |
==== Precision ==== | ==== Precision ==== | ||
Line 170: | Line 171: | ||
This change to the semantics of non-strict comparisons is backwards incompatible. Worse, it constitutes a silent change in core language semantics. Code that worked one way in PHP 7.4 will work differently in PHP 8.0. Use of static analysis to detect cases that may be affected is likely to yield many false positives. | This change to the semantics of non-strict comparisons is backwards incompatible. Worse, it constitutes a silent change in core language semantics. Code that worked one way in PHP 7.4 will work differently in PHP 8.0. Use of static analysis to detect cases that may be affected is likely to yield many false positives. | ||
+ | |||
+ | Testing with [[https:// | ||
===== Vote ===== | ===== Vote ===== | ||
- | Yes/No. | + | Voting starts 2020-07-17 and ends 2020-07-31. A 2/3 majority is required. |
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
rfc/string_to_number_comparison.1594801690.txt.gz · Last modified: 2020/07/15 08:28 by nikic