Re: RFC: Support Closures in constant expressions

From: Date: Wed, 30 Oct 2024 12:06:14 +0000
Subject: Re: RFC: Support Closures in constant expressions
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-125880@lists.php.net to get a copy of this message
On Tue, Oct 29, 2024, at 16:11, Tim Düsterhus wrote: > Hi > > Volker and I would like to start discussion on our RFC to "Support > Closures in constant expressions". > > Please find the following resources for your reference: > > - RFC: https://wiki.php.net/rfc/closures_in_const_expr > - Implementation: https://github.com/php/php-src/pull/16458 > > Best regards > Tim Düsterhus > Hi Tim, This looks interesting, but I notice it says that the closure can access “private properties”: > This means that Closures in property default values may access private properties, methods, and > class constants of the class where they are defined I assume this means private *static* properties since it couldn’t be attached/bound to a specific instance? (Must be static?) — Rob

« previous php.internals (#125880) next »