Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129065 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 B00691A00BC for ; Tue, 4 Nov 2025 09:28:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1762248506; bh=1PSnRRMtItH6Hgt10LuQmc+0UiNgZ3DecDNqqcN+8hI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=KmCSifipVyZXQgDYBMXffibZJvc9EVQZfhe6ryyGhAzVRwqdbLNkdoCWyl0to67Qp VwHqnt+Y80B7zlEVUiGt0u89bm7QCP0uwU3UG4psgEhISZE2+ydZvLrrt4gAWN7w/F JCpWsZHHSjpO9HePqhQo4+tnc/qF3LpeidjrohkSfG5djWV9YytcCj7mPYX6yCcMLG elPhpbv+uvH+Ku5BPIxgSAaVkvChg7VlgHtCekRZnlVoZiCdS6VhOH793zCoZOf7OG rgH7yWnzS87RD2XbboFKWWhy/L+Ew8kUMV2Z6OTpJY0VtHhopwXRLx5q3q2Csnyqwb E31ZakoN+KCdQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7AEB31801E6 for ; Tue, 4 Nov 2025 09:28:22 +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=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,T_SPF_TEMPERROR autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-vk1-f169.google.com (mail-vk1-f169.google.com [209.85.221.169]) (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 09:28:22 +0000 (UTC) Received: by mail-vk1-f169.google.com with SMTP id 71dfb90a1353d-5591c991831so301947e0c.0 for ; Tue, 04 Nov 2025 01:28:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1762248496; x=1762853296; darn=lists.php.net; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=1PSnRRMtItH6Hgt10LuQmc+0UiNgZ3DecDNqqcN+8hI=; b=a9Uj/q6DqCK7Vz7xZVbPesB0EXwHAH9yFZUiLYZ565InabkDvs0sOl+Usd9E4vg3gb UCV66UAZv5haYZIi9kl+36A5L41W0rRSKuRcwn/sPAWW11fWOWaDmUAyrTvX7ojW5JOY o6Wp5VOiPbrpYR47ggVQ/TJWROHskNgQqu1+OkX41XEdtnKw445aYGWgHYToTt16FDSu GlsrZDA9fPSuEVtCIHZhRoTeXTuaEJ/uYEjO4HxL/xY+WFI7YrL+aVhubGQ3Y2Dn1nfb is67gaPOYEKJfcLRQ+hc/eG1F5J2CeG2UKChGCN2XnTMzkGGMxH1zBqaMK8ouUgowImZ E16A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762248496; x=1762853296; h=content-transfer-encoding:cc: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=1PSnRRMtItH6Hgt10LuQmc+0UiNgZ3DecDNqqcN+8hI=; b=O9r4QuaKn2L037sQrZFh/pXnFdLWjwQqA5rxBK+T6vMTRE5eq66/QDzMVH/BIwr8Zm TTOKgwR+9Eee1yhDkek+S4W2ibwNdY+WYseikLjFUjsA30AMlaEbm1NEQpshSLxc9kxk GkorQmb3zwR6fVUuc/yqvJgge5qcG8kkchxZYJf00SKymlGYDsRxMaI9QTX9RtAF5I0f krsFm64zPQmmrTWtPBBnPH1faaae309X42oTWKopW8yo1qic8AXq0+lpP6/gPkqke4nx LcBl7sSu5aKY15KSpdZqySRmCmcGOel5jl9ps57wrHVYCxCdsnbqkAMQyy92EkJNwUJw J/Zg== X-Gm-Message-State: AOJu0Yyhv1z4guhlSwS51/VuWXfOqvp8PjyVHWjpBGKTw5V52kw2r/Ti 2X0fbF0rQfyTZhUpFXbfhRHh+MZwwsa261wmGnnJFoUWnLuEabc+JLhrJhSweGLQ2tvMhw6T+FX 2niShAOIqeUfrawy48PFNW+MffHHOVEKOg4w5 X-Gm-Gg: ASbGncsfvOpf1RTAeQSKgSrCxne7NdCMOUFegqui0FP6ypzn8sdoTSPePhSE0XM8wYG ieT5xUOG8dW6QcizLpDrU0EbYfuLJROdmS4gCl+klzZY7Vjcu/W9nf8Gl4zvHjZII1Shwpy9LZb AlikjQSa9ePM2QySbEJnFALhkkeHyc9Da/X0WL7FVYfK1m5LZnzhn5zfENfDT7GphGQktkMZ8fO VETui3LLFYLUlT1+HJMFROnN7sELMdaN9zEt1Obz1NU3eGZbxN90lfeBvkHOw9kFAQ/FWhUxMyW 5sf5NxnwxjtpSHcx X-Google-Smtp-Source: AGHT+IEjIU+bEWMVtUSUxAuwMIJ4v4tJMOp0IaW+6P1tJqfz5ya8pFIykbQpEvZQfboLchFhvixV5xAtMPTy8siEdVM= X-Received: by 2002:a05:6122:3305:b0:559:5ef5:b198 with SMTP id 71dfb90a1353d-5595ef5d1c5mr1804187e0c.12.1762248496398; Tue, 04 Nov 2025 01:28:16 -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 11:28:04 +0200 X-Gm-Features: AWmQ_bkUASZE1mpe9D5uMwCMaE1RBiZQf846S3cLqy-zaU0fVIGPzWqwyTUw5eA Message-ID: Subject: Re: [PHP-DEV] [RFC][Discussion] use construct (Block Scoping) To: Seifeddine Gmati Cc: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: edmond.ht@gmail.com (Edmond Dantes) Hello all! Thank you for the RFC, it has been missing for many years. If I understand correctly, are you proposing to call `unset` at the end of the block? I see that the **Future Scope** section mentions `Disposable`. But if your goal is to introduce behavior based on `Disposable`, wouldn=E2=80=99t that conflict with the logic of the current RFC? I see a clear pitfall here. If you accept this RFC with the `unset` operation, you will later need a new keyword for `Disposal`, because these are two entirely different scenarios. (Should I explain why?) In this context, I also see a problem, as if the RFC is trying to introduce two different features into the language: 1. **Scope** =E2=80=93 a visibility area. It is the scope that has the `uns= et` logic. 2. **Using** =E2=80=93 a guaranteed call of a disposal function. Because of this, logical issues are likely to arise. If the RFC=E2=80=99s g= oal is unclear and it tries to cover both tasks, the solution risks losing its clarity. P.S. Regarding the questions in the Open Issues, option A seems to have more explicit behavior than option B. --- Best Regards, Ed