Re: [RFC][Discussion] use construct (Block Scoping)

From: Date: Sun, 23 Nov 2025 14:29:34 +0000
Subject: Re: [RFC][Discussion] use construct (Block Scoping)
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-129404@lists.php.net to get a copy of this message
Hi

On 11/3/25 22:46, Seifeddine Gmati wrote:

To also pull it into the top-level:

- We adjusted the keyword from use() to let(). This has a small BC impact that we explained in the corresponding section.
- We refined the entire RFC text to better explain the (design) choices, the focus, to add examples and other clarification.
- Since the initial version - but previously announced - the construct will now reset variables to their original value.
- And with the latest implementation, there are two new OPcodes that simplify the implementation greatly, but that extensions working with OPcodes need to learn about.

The implementation should be up to date with the latest changes.

Best regards
Tim Düsterhus


Thread (42 messages)

« previous php.internals (#129404) next »