Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129071 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 738C61A00BC for ; Tue, 4 Nov 2025 14:00:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1762264806; bh=ybXoibyGS0W5guC0lDBisyufR0lQCe3GiiQCB48pu8s=; h=Date:From:To:In-Reply-To:References:Subject:From; b=eNfRtp8X4RLVv6GjQkhcuyeRgBwioR50t6i/BaB9YOy3yG8jT6SwIMkVe6uqdBREZ 65jhxl1ht4T2fR11u4H4d01jUWnTNJgQq5zqrXd6Atl41oFABOFfmnJPgaYXIslmLb /XoIbA6jY5DeuHvSHSvtsG11gr11rJIcQhDrSs1m3aNFtZUvsAh6PudABa5sMJkXSU /TAO/icbMwAOvD8yNRhqan3rHjp6c6A6IxcnBcS3YSHI5LBi6RMyqYPvs3DZtBqjld 6iZbq3f238hFVWFZgIhJsXF/O2ELo/dYPEmTz7+HODmJx5GdxTgCGVYUx8CqJ850UF 7COAe8nVtThYw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 69C8318005B for ; Tue, 4 Nov 2025 14:00:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-a7-smtp.messagingengine.com (fhigh-a7-smtp.messagingengine.com [103.168.172.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 4 Nov 2025 14:00:04 +0000 (UTC) Received: from phl-compute-12.internal (phl-compute-12.internal [10.202.2.52]) by mailfhigh.phl.internal (Postfix) with ESMTP id 5C3B81400206 for ; Tue, 4 Nov 2025 08:59:59 -0500 (EST) Received: from phl-imap-05 ([10.202.2.95]) by phl-compute-12.internal (MEProxy); Tue, 04 Nov 2025 08:59:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bottled.codes; h=cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1762264799; x=1762351199; bh=+JQQLr3lzR jP8vTaz/UAn2BadgU2oHt+jMxRaW5WCIY=; b=IHcLgi05U8xWEKCoYKA82oImQg 93gOPS+b5k8QoAVMh6cxTjD8FYxoo1Ub/5gd+gpr7RogPfcYAHdRvZh/z/44sjdi lUd1zMBSVYDrKj2HlkuwzNVB4rydAlrRWtre5C8E0FBenSbc0j4vcnTPxMrxuUqB 6au1A2gOsIQedf849zN3/WUH76Ot6Ms+DEyf1YZGE6iTO9vzBg1AYz7FlK0A8eLQ eSqfdhsHyMhrC5T5Liy1Kj6V9FUgEPgSzcCcYNaErNt1jmgXpm515w88qj5S29or X0zczjBO9+dyQbcNL60qcIIP9iPchm85b5FFFYWxDA1iFZc4Vj9sy1jtPEng== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1762264799; x=1762351199; bh=+JQQLr3lzRjP8vTaz/UAn2BadgU2oHt+jMx RaW5WCIY=; b=kBePl5ntGj9FSyVTbaa/ZqHcUgjH4fKXlWLPLp2KqL1CJTBTMsW soRkVNhE3Nqf4/6iHntfJ9aqCw6woR5OQk95zB6e3B6HVToMPXAvzGacM71bAgCc BK+XTr4FjBnxf+mENns09IpjSOJbBRGrAPF+t/ZY0WW1aoGvsKHQskWQuhKN03u2 kzI/k8sCF1lZHvxLfEOapHHL6hksukuelP+hZRrTbNFD16ywsZouO/Dq8mufuy6S kienOAHb0oj3uayaoMovTOJf34lZN8hntje/LlLnPL28BWYmqEqLECg9AJDmWp6p h4zhpuBEuCOSJYS5l6KjYhfJYFarb2D74CA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddukeduvddtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefoggffhffvkfgjfhfutgesrgdtreerre dtjeenucfhrhhomhepfdftohgsucfnrghnuggvrhhsfdcuoehrohgssegsohhtthhlvggu rdgtohguvghsqeenucggtffrrghtthgvrhhnpeehieffkeetleejueefjeffueffheevud fgteevfeeijeevfffhhfegueetteffleenucffohhmrghinhepphhhphdrnhgvthdpghhi thhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomheprhhosgessghothhtlhgvugdrtghouggvshdpnhgspghrtghpthhtohepuddp mhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepihhnthgvrhhnrghlsheslhhishhtsh drphhhphdrnhgvth X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id DA9C61820054; Tue, 4 Nov 2025 08:59:58 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 X-ThreadId: AZHpvRB0--8k Date: Tue, 04 Nov 2025 14:59:38 +0100 To: internals@lists.php.net Message-ID: In-Reply-To: References: Subject: Re: [PHP-DEV] [RFC][Discussion] use construct (Block Scoping) Content-Type: multipart/alternative; boundary=1ddcd84fbe6e47da9c107cf3597b92c2 From: rob@bottled.codes ("Rob Landers") --1ddcd84fbe6e47da9c107cf3597b92c2 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, Nov 3, 2025, at 22:46, Seifeddine Gmati wrote: > Hello internals, >=20 > Tim and I would like to open the discussion on our new RFC that we've = been working on: "use construct (Block Scoping)". >=20 > We wanted to raise a few initial points: >=20 > =E2=80=A2 The RFC proposes the ``use`` keyword. What are your thought= s on a new ``using`` keyword instead, similar to C# or Hack? >=20 > =E2=80=A2 How do you feel about the questions raised in the "Open Iss= ues" section? >=20 > =E2=80=A2 What are your general thoughts on the RFC? >=20 > Please find the following resources for your reference: >=20 > =E2=80=A2 RFC: https://wiki.php.net/rfc/optin_block_scoping >=20 > =E2=80=A2 POC: https://github.com/php/php-src/compare/master...TimWol= la:php-src:block-scope >=20 > Thanks, >=20 > Seifeddine Gmati. >=20 Hello, One thing that isn't clear with this RFC is what happens to things redef= ined in the scope? $a =3D 10; use ($a =3D 5) { var_dump($a); } var_dump($a); // unset or 10? =E2=80=94 Rob --1ddcd84fbe6e47da9c107cf3597b92c2 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Mon, Nov = 3, 2025, at 22:46, Seifeddine Gmati wrote:

Hello internals,<= /p>

Tim = and I would like to open the discussion on our new RFC that we've been w= orking on: "use construct (Block Scoping)".

We wanted to raise a few = initial points:

  • The RFC proposes the `use` = keyword. What are your thoughts on a new `using` keyword in= stead, similar to C# or Hack?

  • How do you feel about the ques= tions raised in the "Open Issues" section?

  • What are your gen= eral thoughts on the RFC?

Please find the following resourc= es for your reference:

Thanks,

Seifeddine Gmati.

<= /blockquote>

Hello,

One thin= g that isn't clear with this RFC is what happens to things redefined in = the scope?

$a =3D 10;

= use ($a =3D 5) {
  var_dump($a);
}
var_dump($a); // unset or 10?

=E2=80=94 Rob
--1ddcd84fbe6e47da9c107cf3597b92c2--