On Wed, Jan 22, 2025, at 15:35, Tim Düsterhus wrote:
> Hi
> 
> Volker and I would like to start discussion on our RFC to support "First 
> Class Callables in constant expressions".
> 
> Please find the following resources for your reference:
> 
> - RFC: https://wiki.php.net/rfc/fcc_in_const_expr
> - Implementation: https://github.com/php/php-src/pull/17213
> 
> - The related "Support Closures in constant expressions" RFC: 
> https://wiki.php.net/rfc/closures_in_const_expr
> - The "Support Closures in constant expressions" discussion: 
> https://externals.io/message/125872
> 
> Best regards
> Tim Düsterhus
> 

Hey Tim,

My only concern with the RFC is something a bit silly. If I understand 
correctly, this will be a constant expression:

fn(string $foo) => print $foo

But this will not:

(fn(string $foo) => print $foo)(...)

despite them both basically being the same thing.

It is an incredibly small inconsistency (imho), but other than that, ship it.

— Rob

Reply via email to