Re: [PHP-DEV] [RFC] Define proper semantics for range() function

2023-03-28 Thread Christian Schneider
Am 28.03.2023 um 14:42 schrieb G. P. B. : > On Tue, 28 Mar 2023 at 08:19, Christian Schneider > wrote: >> There are two cases I would handle differently: >> - I'm not sure why a negative step for $start > $end is considered wrong, I >> consider range(10, 0, -2) at least as logical/readable as

Re: [PHP-DEV] RFC [Discussion]: Make unserialize() emit a warning for trailing bytes

2023-03-28 Thread Tim Düsterhus
Hi On 3/28/23 09:27, Christian Schneider wrote: Personally, I'd like the unserialize to throw an exception if trailing bytes are detected. If not by default then with the use of the option passed to unserialize function. If that's the desired direction, it makes more sense to emit a

Re: [PHP-DEV] RFC [Discussion]: Make unserialize() emit a warning for trailing bytes

2023-03-28 Thread Christian Schneider
Am 28.03.2023 um 00:22 schrieb Larry Garfield : > On Mon, Mar 27, 2023, at 2:12 PM, Mel Dafert wrote: >> On 27 March 2023 20:20:58 CEST, "Michał Marcin Brzuchalski" >> wrote: >>> Personally, I'd like the unserialize to throw an exception if trailing >>> bytes are detected. >>> If not by default

Re: [PHP-DEV] [RFC] Define proper semantics for range() function

2023-03-28 Thread Christian Schneider
Am 28.03.2023 um 00:36 schrieb G. P. B. : > I therefore propose the "Define proper semantics for range() function" RFC > to address the unintuitive behaviour that sees no usage and/or hide bugs: > https://wiki.php.net/rfc/proper-range-semantics > > The change propose to throw TypeErrors and

Re: [PHP-DEV] [RFC] Define proper semantics for range() function

2023-03-28 Thread Tim Düsterhus
Hi On 3/28/23 00:36, G. P. B. wrote: I therefore propose the "Define proper semantics for range() function" RFC to address the unintuitive behaviour that sees no usage and/or hide bugs: https://wiki.php.net/rfc/proper-range-semantics The "ASCII code point range" example is confusing, because

Re: [PHP-DEV] [RFC] Define proper semantics for range() function

2023-03-28 Thread G. P. B.
On Tue, 28 Mar 2023 at 08:19, Christian Schneider wrote: > Am 28.03.2023 um 00:36 schrieb G. P. B. : > > I therefore propose the "Define proper semantics for range() function" > RFC > > to address the unintuitive behaviour that sees no usage and/or hide bugs: > >

Re: [PHP-DEV] [RFC] Define proper semantics for range() function

2023-03-28 Thread G. P. B.
On Tue, 28 Mar 2023 at 08:29, Tim Düsterhus wrote: > Hi > > On 3/28/23 00:36, G. P. B. wrote: > > I therefore propose the "Define proper semantics for range() function" > RFC > > to address the unintuitive behaviour that sees no usage and/or hide bugs: > >