Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128859 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 8C2031A00BC for ; Fri, 17 Oct 2025 08:24:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1760689452; bh=dsehyPD+HVVPaHFn7ktJVrvtVPSlsm06FywmFsXPFX4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=U5S6VxS+C91V7PkM0oNDM/d0FVf5QEj2k/9wdPeC/JHm91zHx/mvrMawZzP6E5+z0 K33pY91SwdRkgSWpRRkjr1uLVmqwaRKLW84/B6yxQihryuSWd8fyI8RgKJR35YVfr3 BMiHIsrDRsJk2YW2VX9d+OonP0RtpwHCZalP87xb1ijp4CcVxZaq25B6KlbZ+oBshL 5J+0NoS32dqS/ZDZThhaFU9WQqaexsr3RciueuKoNFayjXm+7GcD9wm7WD9PVDdiSR 1QT11riFJYewAvHE/+cj2/ytc5MUWQFBtGjg/iifthjhE0+GBVkUJocJuBcvQnqc4i wqC/Gj+O3FAjQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 89D9018005D for ; Fri, 17 Oct 2025 08:24:11 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (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 ; Fri, 17 Oct 2025 08:24:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1760689445; bh=0FNpoihDiWi2dSbpHZsE7mRx4nlzQsKh/wmGRK9XY10=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=XQPTGHLNk4Mcm8yZWwDr7Gscrcvu8Z+6W4HMQaHN9k3Wc3ZOD9uzlcRiW3D+AIFDE kNDxyLaFwRhDUgSbCO6u9dPCbwdvekE8i7/izpam+g2IYv/ilkL12ltkn7+vNTK2Lj ioJFXbEhTKmLsUWVYfebBNMs48vgaiOuv0Y+I0rUs1TrjKNUJrIJBtv9/gcSH4tWDk miBo5al0Xrg04YVp7toacdePhcPcwfZnjgPf1HFmUtCw4HX+pMwZnTlwmgHSN5xd2I VYhSCy8J7Xp/b9Q1ZF7/c7CSP0f4gasFOWSc0Yk7Qol483PkSMqC9ZH6fRaBChrvnK o6PMh/PXQ0zQg== Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Date: Fri, 17 Oct 2025 10:24:04 +0200 To: Arnaud Le Blanc Cc: Larry Garfield , php internals Subject: Re: [PHP-DEV] [RFC] Partial Function Application v2 In-Reply-To: References: <13830641-0fb9-4de9-94ed-8873045ef820@app.fastmail.com> Message-ID: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi Am 2025-10-13 19:00, schrieb Arnaud Le Blanc: >> - How does it interact with >> `ReflectionFunctionAbstract::getClosureUsedVariables()`? >> - Same question for other scope introspection functionality (e.g. >> Xdebug). > > getClosureUsedVariables() and other introspection functionality will > report any used var as usual. Used vars are named after the parameter > if there is no collision. But this should not be considered API as > this may change. For instance, I want to optimize-out used vars for > parameters that are pre-filled with a literal. It would be possible to > hide used vars of a PFA in Reflection. Understood, thank you for the clarification. Please add this information to the RFC (ideally with examples of the possible cases, e.g. the passing of the `Closure` object). It's fine if you explicitly say “we consider this an implementation detail, but this is how it currently works”. This is also useful information to have if a user reports a bug in PFA that relates to this, so that we can tell them “what you are doing is not guaranteed to work, please don't”. Best regards Tim Düsterhus