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

From: Date: Tue, 04 Nov 2025 10:01:12 +0000
Subject: Re: [RFC][Discussion] use construct (Block Scoping)
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-129066@lists.php.net to get a copy of this message
Hi

Am 2025-11-04 06:16, schrieb Nick:
I think the three existing meanings of use are enough. A new keyword would be better. But, if a new keyword, why not scoped?
Thank for the keyword suggestion. Personally I could also imagine let(), possibly combined with an in:
    let ($x = 10, $y) in {
        var_dump($x); // int(10)
        var_dump($y); // NULL
        $z = 20;
    }
Best regards Tim Düsterhus

Thread (42 messages)

« previous php.internals (#129066) next »