Re: [PHP-DEV] [RFC] [VOTE] Saner numeric strings

2020-07-31 Thread G. P. B.
Hello internals, Although, 1 day later than meant to, I'm glad to announce the Saner Numeric String RFC has been accepted with 30 votes in favour and 4 votes against. The secondary implementation detail vote has failed with 2 votes in favour and 27 votes against. Best regards George P. Banyard

Re: [PHP-DEV] [RFC] [VOTE] Saner numeric strings

2020-07-22 Thread Bruce Weirdan
On Wed, Jul 22, 2020 at 4:21 PM Christian Schneider wrote: > but not to arithmetic *operators* like 42 + "" because that doesn't > currently trigger E_WARNING AFAIK. > It does produce warning since PHP 7.1 : https://3v4l.org/4CV1E -- Best regards, Bruce Weirdan

Re: [PHP-DEV] [RFC] [VOTE] Saner numeric strings

2020-07-22 Thread Christian Schneider
Am 16.07.2020 um 16:18 schrieb G. P. B. : > I've opened voting for the Saner Numeric strings RFC: > https://wiki.php.net/rfc/saner-numeric-strings Looking at the BC section I stumbled across > Code relying on the fact that '' (an empty string) evaluates to 0 for > arithmetic/bitwise operations.

Re: [PHP-DEV] [RFC] [VOTE] Saner numeric strings

2020-07-17 Thread Bob Weinand
> Am 17.07.2020 um 11:30 schrieb Nikita Popov : > > On Fri, Jul 17, 2020 at 11:27 AM Bob Weinand > wrote: > Hey George, > > while I agree with your RFC in general, changing the autocast behavior of the > empty string is not acceptable for me. > > Empty strings often

Re: [PHP-DEV] [RFC] [VOTE] Saner numeric strings

2020-07-17 Thread Nikita Popov
On Fri, Jul 17, 2020 at 11:27 AM Bob Weinand wrote: > Hey George, > > while I agree with your RFC in general, changing the autocast behavior of > the empty string is not acceptable for me. > > Empty strings often are the output of non-existing things, like default > value of a text field in a DB,

Re: [PHP-DEV] [RFC] [VOTE] Saner numeric strings

2020-07-17 Thread Bob Weinand
Hey George, while I agree with your RFC in general, changing the autocast behavior of the empty string is not acceptable for me. Empty strings often are the output of non-existing things, like default value of a text field in a DB, when reading files not filled with inputs yet etc. It should e

Re: [PHP-DEV] [RFC] [VOTE] Saner numeric strings

2020-07-16 Thread Mark Randall
On 16/07/2020 15:43, Nikita Popov wrote I haven't backported any deprecation warnings to 7.4. Adding deprecations to released versions is a hard no-go. My apologies. I'd got my wires crossed with seeing https://github.com/php/php-src/pull/3917 appear on the PRs. -- PHP Internals - PHP Runti

Re: [PHP-DEV] [RFC] [VOTE] Saner numeric strings

2020-07-16 Thread Nikita Popov
On Thu, Jul 16, 2020 at 4:35 PM Mark Randall wrote: > On 16/07/2020 16:15, G. P. B. wrote: > > I do agree that accepting trailing whitespace may be considered > suboptimal > > but as leading whitespaces don't even emit an E_NOTICE it is impossible > to > > drop this "feature". > > Didn't someone

Re: [PHP-DEV] [RFC] [VOTE] Saner numeric strings

2020-07-16 Thread Mark Randall
On 16/07/2020 16:15, G. P. B. wrote: I do agree that accepting trailing whitespace may be considered suboptimal but as leading whitespaces don't even emit an E_NOTICE it is impossible to drop this "feature". Didn't someone (Nikita?) already back-port a warning to 7.4 about some changes coming

Re: [PHP-DEV] [RFC] [VOTE] Saner numeric strings

2020-07-16 Thread G. P. B.
On Thu, 16 Jul 2020 at 15:39, Marco Pivetta wrote: > Hey George, > > I really like this specific bit of the proposal: > > > And the various cases which currently emit an E_WARNING will be > promoted to TypeErrors. > > I really do not like these particular horrible behaviors of the language > (hu

Re: [PHP-DEV] [RFC] [VOTE] Saner numeric strings

2020-07-16 Thread Marco Pivetta
Hey George, I really like this specific bit of the proposal: > And the various cases which currently emit an E_WARNING will be promoted to TypeErrors. I really do not like these particular horrible behaviors of the language (huge "yikes" for PHP being so broken): * `"123" == "123 "` - do not

[PHP-DEV] [RFC] [VOTE] Saner numeric strings

2020-07-16 Thread G. P. B.
Hello internals, I've opened voting for the Saner Numeric strings RFC: https://wiki.php.net/rfc/saner-numeric-strings This will last 2 weeks until the 30th of July Best regards George P. Banyard