Re: [RFC][Under discussion] Fetch properties in const expressions

From: Date: Wed, 15 Jun 2022 04:44:24 +0000
Subject: Re: [RFC][Under discussion] Fetch properties in const expressions
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-117950@lists.php.net to get a copy of this message
Hello! Just a question. Would this also be allowed? https://3v4l.org/RGdIA <?php class A {public int $i = 42;} const BARE_CONSTANT = new A; class B { const ClassConstant = BARE_CONSTANT; } class C { const ClassConstantViaPropertyFetching1 = BARE_CONSTANT->i; const ClassConstantViaPropertyFetching2 = B::ClassConstant->i; } Thanks! -- Shinji Igarashi 2022年5月28日(土) 18:44 Ilija Tovilo <tovilo.ilija@gmail.com>: > > Hi everyone > > I'd like to start a discussion on a simple RFC to allow fetching > properties in constant expressions. > https://wiki.php.net/rfc/fetch_property_in_const_expressions > > The RFC proposes adding support for fetching properties in constant > expressions using the -> operator. I'm looking forward to your > feedback. > > Regards, > Ilija > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php >

« previous php.internals (#117950) next »