guilliamxavier · GitHub

guilliamxavier

@Girgias

@Girgias

@Girgias Girgias changed the title Permit trailing whitespace in numeric strings Saner numeric strings

Jun 29, 2020

@Girgias

nikic

@Girgias

@Girgias

@Girgias

@Girgias

Closed

nikic

@Girgias

nikic

@Girgias

nikic

All "numeric" strings which emitted a notice now emit the usual warning.
…ing offset
…d as string offset"
As the secondary vote for this is failing
This reverts commit a835d27b31185688053a79eac59650a70eb97060.

@Girgias

@Girgias

Girgias deleted the trailining-numeric-whitespace branch

July 29, 2020 01:51

adrian-enspired pushed a commit to adrian-enspired/php-src that referenced this pull request

Aug 4, 2026
RFC: https://wiki.php.net/rfc/saner-numeric-strings
This removes the -1 allow_error mode from is_numeric_string functions and replaces it by
a trailing boolean out argument to preserve BC in a couple of places.
Most of the changes can be resumed to "numeric" strings which emitted a E_NOTICE now emit
a E_WARNING and "numeric" strings which emitted a E_WARNING now throw a TypeError.
This mostly affects:
 - String offsets
 - Arithmetic operations
 - Bitwise operations
Closes phpGH-5762

Read the original on github.com ↗