Re: [RFC] Deprecations for PHP 8.6

From: Date: Mon, 22 Jun 2026 17:14:42 +0000
Subject: Re: [RFC] Deprecations for PHP 8.6
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-131467@lists.php.net to get a copy of this message
On 22 June 2026 17:38:29 BST, Bob Weinand <bobwei9@hotmail.com> wrote: > >I don't think we should deprecate "let". let is universally used for >block-scoping in other languages. I don't think PHP should ever have block-scoping inside >functions. The corresponding RFC was also declined with 50%+ of the vote. Hence I don't think >we should deprecate a name which won't ever be needed. The RFC raised was for a unique-to-PHP concept of a special "scope block" using the "let" keyword in a way no other language does. Taking that vote to mean nobody wants block scoping is a huge stretch. In fact, I think block scoping would be a really useful addition to the language, and hope someone brings forward a proposal which more closely mirrors other Algol-descended languages. For me, it is a prerequisite for auto-capture closures, because it gives a way to unambiguously opt *out* of capture; but it also has plenty of other uses, just as it does in other languages. Whether we need to reserve the name to allow that, I will leave to those who know more about the parser. Rowan Tommins [IMSoP]

« previous php.internals (#131467) next »