Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129074 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 60E5D1A00BC for ; Tue, 4 Nov 2025 18:06:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1762279607; bh=LFZlfkS6KWlRk4Ff+sgninfyRfCG1tegRdHNRoYl4jI=; h=References:In-Reply-To:From:Date:Subject:To:From; b=Gf9lk47NkeOLK7txNuHc54eZ+/WCQb8rvV1pDbzb0Gvt2fPYpklSrd/yk+n/Z951D sLBpMqXlMpmcrCIsGypHeLbgT9N6+NC9Qv8MnO0FO/4Tg6IvcDClpyFhciixBYfmnh gKanvR4mXaHdvk3dUgMpVCrlxeDMm8CnZJdlKFhQaNNi8fiNhEgNCuUqw0EF/+oKQX J+oFdmRwcsmNYJU3cXpbMgRXUVC/9TU/sRRWwWRBFLnu6q21GxqEtlddx/HmeeuVb1 1bbxN2w4lmCs353wH72gzIHOvxRgOhyrkDnz6O+MO3xfTP9IkaGxePrrvdVk7eMj3H oRD5qbwxGwQ4Q== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A28BB180388 for ; Tue, 4 Nov 2025 18:06:45 +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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DMARC_MISSING,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-ua1-f44.google.com (mail-ua1-f44.google.com [209.85.222.44]) (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 18:06:45 +0000 (UTC) Received: by mail-ua1-f44.google.com with SMTP id a1e0cc1a2514c-935134ef989so3623992241.3 for ; Tue, 04 Nov 2025 10:06:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=carthage-software.20230601.gappssmtp.com; s=20230601; t=1762279599; x=1762884399; darn=lists.php.net; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=3oB4oOhm8ns1a7F9RJwSbxRd1d8fmjXuv2Prrmdtyt0=; b=A2dKcMm06eZSaZCjd2jNT1vHzGMshLMhU9vDcuDctBXaQ+Huo2i4SsR7RIKAlujhZf lXpK05JFbLCvir68soJDnSWlMBU1EYgeoNiS5cdxMXipor16bQUMoZD+1RrIHyoiJbIr BTCcnP7c65boDw7ZxfQ2/RMBDwHz/e2qGPiBYeNGwE0PNI7DVdOVj3/n27BePqZt7sbB CLkKOfyGBWf9HnUf9wmpnEN51D3Al8BoNPFV3n7Cq2+7kxAcjFQy00PvSBb6iBH1V+Nz rzRYipuyr41Bf7vymW+5niUAl7Zey/awRNUaYK6KzgB9kpSHWzd3NqhjOx5iG147mboe IzIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762279599; x=1762884399; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3oB4oOhm8ns1a7F9RJwSbxRd1d8fmjXuv2Prrmdtyt0=; b=UbO+vuh80JiCZfBXaNYTVOfjZ8Q68aelVu+1eBZA0wG0CsmLQEu5ZVrSH6sNPZLrGb J+/TwSwigsxQVA0sMgf7i+Xb7hhrUViD+B628NI9Gg8PUpRogOazLoEVE99Pe9KlPSJ1 +YWIxEOuufAD71sR2M/UMnbPeBkvl0258QS7XAH6hC+yHui0SXEeGyOmhtF2hbKLDQ7Z PwJFPMb1D+yMeWOo5PTAFnl+GL9C6fVsvcJuhlbxV3rvfzuVB/XbUnqbKd4slBDDkmzD ICyNlgGTeEeghQU3oYfflOGYTo8mquYkNY4PVjZ2z6LY0ABXCwuR0TXa8TESpY8Ow7Fz Xs7w== X-Gm-Message-State: AOJu0YzzrQwMA8Lss+T+ytu2m6XhqEa6BoQC8NpRIlXFjYaOxKF3AtYe yJCtvj58XL48hm8NGsf2zD4AO8IAdeqUUfU5fpzlxiVqRIXgrta1Yr7DPPvz/Z6xVf44MAg0ZsX tXUfPyoOUJlXsUgZilhZ4okcbuDfJL0ZDcxTw+jgazGrvxucUeZtGz6Hjnw== X-Gm-Gg: ASbGncv1oKG9f89In9oekSOCJsxV/vk5r724HSvTBmsHWnd5CterND8cs7jl3ed+iKc WrLP0jE5VSctmIaw5vEWHDWYWzx5vn/hAsDqfZEG1chfASs2UJPI95FWxqvMxJRf94LDYppkgUV MZdDtPWlK/2r9rtEotu4gRnDOSjOyK6fivPQ7BcY+4g2l2AfjzHkTJVlRdK/ITM2uRLHg9GxdJQ VLB+d1FF6fFQDkagftVIsUUiK6L7c+nT68netyCa2zFyR8WAfrMNUl3N6Nbhqv3DWQ7npw8YZQW t/YUSw== X-Google-Smtp-Source: AGHT+IHHkFIg2vkpSz8mySYQ8DGaRRU+DRcwh+BJ19N+ek4piRu4VdA7KAlbtoNeBcuun7fbrTjJMF16BhZXUV8JX50= X-Received: by 2002:a05:6102:4188:b0:5d7:de28:5618 with SMTP id ada2fe7eead31-5dd88e9449dmr216570137.5.1762279597739; Tue, 04 Nov 2025 10:06:37 -0800 (PST) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 4 Nov 2025 19:06:26 +0100 X-Gm-Features: AWmQ_bmRYoMPgZ0So5Z_mcLuzEjhptVG2ITJe-SHT4jMhtwfuuhRK9l0jZAskLs Message-ID: Subject: [PHP-DEV] Re: [RFC][Discussion] use construct (Block Scoping) To: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" From: azjezz@carthage.software (Seifeddine Gmati) On Mon, 3 Nov 2025 at 22:46, Seifeddine Gmati wrote: > > Hello internals, > > Tim and I would like to open the discussion on our new RFC that we've been working 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 instead, similar to C# or Hack? > > How do you feel about the questions raised in the "Open Issues" section? > > What are your general thoughts on the RFC? > > Please find the following resources for your reference: > > RFC: https://wiki.php.net/rfc/optin_block_scoping > > POC: https://github.com/php/php-src/compare/master...TimWolla:php-src:block-scope > > Thanks, > > Seifeddine Gmati. > > Hello internals, Following up on the keyword discussion: I ran an analysis tool across 507,529 PHP files from the top +14,000 Composer packages. Results: https://github.com/azjezz/php-syntax-analyzer#results Summary: `let`, `using`, `scope`, and `block` have zero or minimal conflicts (0-1 occurrences). `with` has 111 conflicts across multiple packages and should be avoided if we decide to use a new keyword. Thanks, Seifeddine Gmati.