[RFC] Define proper semantics for range() function
| From: | G. P. B. | Date: | Mon, 27 Mar 2023 22:36:21 +0000 |
| Subject: | [RFC] Define proper semantics for range() function | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-119749@lists.php.net to get a copy of this message | ||
Hello internals,
While working on analysing the impact of the changes proposed by amending
the behaviour of the increment and decrement operators (
https://wiki.php.net/rfc/saner-inc-dec-operators)
I discovered that the
range() function has some rather lax behaviour that is very unintuitive.
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 ValueErrors for case where I
couldn't find occurrences in the wild and hide bugs, and emit some
E_WARNINGs for cases that are hard to detect via static analysis.
Best regards
George P. Banyard