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

From: Date: Tue, 04 Nov 2025 02:08:12 +0000
Subject: Re: [RFC][Discussion] use construct (Block Scoping)
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-129060@lists.php.net to get a copy of this message
> We wanted to raise a few initial points: > > The RFC proposes the use keyword. What are your thoughts on a > new using keyword instead, similar to C# or Hack? > I’m undecided on this. However, using might be easier to understand since use could be confused with the existing keyword. > How do you feel about the questions raised in the "Open Issues" section? > I prefer Option B for restoring the value. > What are your general thoughts on the RFC? > In general, I support this RFC. I’d like to see examples from other programming languages, though. You mention C# and Hack above. Can you elaborate in the RFC on how they implement this functionality? What about other programming languages? I know some (Rust maybe?) are scoped to blocks by default. Cheers, Ben

« previous php.internals (#129060) next »