rfc:trailing_whitespace_numerics
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
rfc:trailing_whitespace_numerics [2019/02/07 01:32] – missing clause ajf | rfc:trailing_whitespace_numerics [2019/02/07 01:38] – TBDs ajf | ||
---|---|---|---|
Line 44: | Line 44: | ||
To follow on from part 1, for the next PHP x.0 (currently PHP 8.0), this RFC proposes that the concept of the “non-well-formed” numeric string be removed, and instead all such strings be treated as non-numeric. This change would break backwards-compatibility and thus is proposed for a major instead of minor PHP version. | To follow on from part 1, for the next PHP x.0 (currently PHP 8.0), this RFC proposes that the concept of the “non-well-formed” numeric string be removed, and instead all such strings be treated as non-numeric. This change would break backwards-compatibility and thus is proposed for a major instead of minor PHP version. | ||
- | The hope is that the backwards compatibility impact would be limited by Part 1's acceptance of trailing whitespace, since that would prevent a large category of currently non-well-formed strings from being affected. The remaining cases should be rarer and code can be easily updated with the addition of explicit conversions (< | + | The hope is that the backwards compatibility impact would be limited by Part 1's acceptance of trailing whitespace, since that would prevent a large category of currently non-well-formed strings from being affected. |
In order to prepare for the backwards-compatibility break in the following major version, the “A non well formed numeric value encountered” notice (where currently produced) should be changed in the PHP 7.x (currently PHP 7.4) to mention that this behaviour is deprecated, i.e. ”A non well formed numeric value encountered (non well formed numeric values are deprecated and will be considered non-numeric in PHP 8.0)”. | In order to prepare for the backwards-compatibility break in the following major version, the “A non well formed numeric value encountered” notice (where currently produced) should be changed in the PHP 7.x (currently PHP 7.4) to mention that this behaviour is deprecated, i.e. ”A non well formed numeric value encountered (non well formed numeric values are deprecated and will be considered non-numeric in PHP 8.0)”. | ||
Line 50: | Line 50: | ||
For the PHP interpreter, | For the PHP interpreter, | ||
- | * [[rfc: | + | * [[rfc: |
* The < | * The < | ||
* Type checks for built-in/ | * Type checks for built-in/ | ||
Line 59: | Line 59: | ||
* The < | * The < | ||
* The < | * The < | ||
+ | |||
+ | TBD: what about explicit conversions, | ||
The PHP language specification' | The PHP language specification' |
rfc/trailing_whitespace_numerics.txt · Last modified: 2020/07/23 21:50 by ajf