Re: [PHP-DEV] Pattern matching details questions

2025-02-05 Thread Larry Garfield
On Tue, Feb 4, 2025, at 4:30 PM, Rob Landers wrote: > On Tue, Feb 4, 2025, at 22:16, Larry Garfield wrote: >> Patterns are deliberately designed as a superset of existing DNF types. You >> can already have a type of Foo&Bar, so we want the pattern for "instanceof >> Foo || instanceof Bar" to be

Re: [PHP-DEV] Empty subject in match and switch constructions

2025-02-05 Thread Morgan
On 2025-02-05 09:49, Larry Garfield wrote: > Feature-wise, I have to say I'd keep it strict-always, as both our PRs implement it. Yes, that means preg_match() wouldn't be able to slot in transparently. I'm frankly OK with that; hopefully pattern matching can be extended to a better regex syn

Re: [PHP-DEV] Deprecate filter_input() or not?

2025-02-05 Thread Jakub Zelenka
Hi, On Wed, Feb 5, 2025 at 2:15 PM Christoph M. Becker wrote: > Hi all! > > There is some discussion on a recent bug report[1] about filter_input() > and related functionality. The bug report had been closed, because this > functionality has already been added to the general deprecation RFC for

Re: [PHP-DEV] Deprecate filter_input() or not?

2025-02-05 Thread Kamil Tekiela
While the filter API wasn't designed with this in mind, the use of filter_input to get the unmodified data is probably the only good reason to ever use this API. If possible, it would be better to have dedicated functions in standard for reading the unmodified input data and then deprecate this fun

[PHP-DEV] Deprecate filter_input() or not?

2025-02-05 Thread Christoph M. Becker
Hi all! There is some discussion on a recent bug report[1] about filter_input() and related functionality. The bug report had been closed, because this functionality has already been added to the general deprecation RFC for PHP 8.5[2]. Then the OP raised a point regarding the usefulness of filte

Re: [PHP-DEV] Deprecate filter_input() or not?

2025-02-05 Thread Rob Landers
On Wed, Feb 5, 2025, at 14:13, Christoph M. Becker wrote: > Hi all! > > There is some discussion on a recent bug report[1] about filter_input() > and related functionality. The bug report had been closed, because this > functionality has already been added to the general deprecation RFC for > P

Re: [PHP-DEV] RFC: First Class Callables in constant expressions

2025-02-05 Thread Tim Düsterhus
Hi Am 2025-02-02 15:35, schrieb Rob Landers: My only concern with the RFC is something a bit silly. If I understand correctly, this will be a constant expression: You understood that correctly. It is an incredibly small inconsistency (imho), but other than that, ship it. I wouldn't call it

Re: [PHP-DEV] RFC: Not Null Assertion Operator

2025-02-05 Thread Ilija Tovilo
Hi Mihail Thanks for your proposal. On Wed, Feb 5, 2025 at 9:24 AM Mihail Liahimov <91lia...@gmail.com> wrote: > > Good afternoon. I would like to create an RFC on the implementation of the > NOT null assertion operator. Do you think it makes sense to create it? I was > able to implement the op

[PHP-DEV] Re: RFC: First Class Callables in constant expressions

2025-02-05 Thread Volker Dusch
On Wed, Jan 22, 2025 at 3:35 PM Tim Düsterhus wrote: > - RFC: https://wiki.php.net/rfc/fcc_in_const_expr > - Implementation: https://github.com/php/php-src/pull/17213 With the two weeks discussion time elapsing later today and given the feedback we received, we plan to open the vote tomorrow pe

Re: [PHP-DEV] RFC: Marking return values as important (#[\NoDiscard])

2025-02-05 Thread Volker Dusch
On Tue, Feb 4, 2025 at 12:10 PM Derick Rethans wrote: > What's the reason why this emits a warning though, instead of throwing > an Exception? I'm sure you thought of it, but it would be nice to have > that consideration mentioned in the RFC. > Thank you for the question, I now added the missing

[PHP-DEV] RFC: Not Null Assertion Operator

2025-02-05 Thread Mihail Liahimov
Good afternoon. I would like to create an RFC on the implementation of the NOT null assertion operator. Do you think it makes sense to create it? I was able to implement the operator. I've already posted a draft in my github - https://github.com/rekmixa/php-src/tree/feature/not_null_assertion_opera