Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128827 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 0FF091A00BC for ; Mon, 13 Oct 2025 21:00:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1760389222; bh=oTSQVyqZSfbuwPic0dYLvGFqXXV5S/h0cO24IYZk428=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=elwVYTmMX/l9bA5vmvBfpc45etUH2CMkbtr6luV/fYN0zsL7Bmz5DLnQvJHiZdur/ IX2nMCHISrliG2sy36TOIFtRNQlqiXDANFniMVUU0Gv67MwiHbRV69wcN6dBdsvjn1 bIzFh+g6EXpTX83i80XYhEWSs0xb75qJ9M6bXvS0X+A2nKV3e5ySVigyDAOBIlhJtH vm5vDKo/hcCXbDFtkjzHii0nOf2HmtMyyHkpo1SN99xuTLU62EqeaVar9IrMiclLfd tN36Zod/46/8FJtHftHMh1wZtoIZ5160NooJXWRFxMcW62/Vy24OagxcpwDSiHWizs Lb9b6O7TqWrWA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D8A7C1801E4 for ; Mon, 13 Oct 2025 21:00:21 +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 ; Mon, 13 Oct 2025 21:00:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1760389214; bh=8X2Gb8gdb2+RPqpxjQ31OWDbFMCKLUaNaHv0+d1srl4=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=Jhhg8jM9O7IyCZyGTmeQvnFHQ56b7oRUnfkg4CGBpSqxdnT3kHiCGFC/Juh4jsVEB 1Ptby5S3xdqdkwXmuPD0T9wQFyaPQyH1Qe11vbptqHzw3rplX5B2iqkZXVpUUV3aG5 cpjJIxnSEaCnCsN9y+m0C+27CbBwd8n5bKuUrv99JSCU5gczzfBNegCzV0uzrXmWcE Vx5bLr4JbM/y8Z6Aat3DXWGv1h33oyR9zeXDFoHxYGocC3GFNdBwqkoyp2SqxvaBZV 6CRxUtD/9CaxWQy8t4ap2XsK83qOfvFUmfYkwwgysBjC2E6LUgS8sYVJDRCo2Th2Gr j3jpr0zQ+e0yg== Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Date: Mon, 13 Oct 2025 23:00:14 +0200 To: Larry Garfield Cc: php internals Subject: Re: [PHP-DEV] [RFC] Partial Function Application v2 In-Reply-To: <17c4de1b-96bd-424f-b1ed-637cfc961464@app.fastmail.com> References: <13830641-0fb9-4de9-94ed-8873045ef820@app.fastmail.com> <17c4de1b-96bd-424f-b1ed-637cfc961464@app.fastmail.com> Message-ID: <5f3d595367cee8d7506b54a6c5cb3d78@bastelstu.be> 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 I'll give the RFC another read at a later point, but I wanted to get something out before I forget: Am 2025-10-13 20:23, schrieb Larry Garfield: >> - How does it interact with `compact()`, specifically: >> >> $partial = compact(someValue(), ?); >> >> Would the `?` be able to capture a variable containing the return >> value >> of `someValue()`? > > Good question! compact(), extract(), etc. can't actually work with > PFA, because they operate on the ambient context, which PFA by design > changes. I've updated the RFC to note three incompatible core > functions. (The other is func_get_arg()). - `get_defined_vars()` should be added to the list (possibly more?). Or to make things easier: Just say everything that doesn't already work with FCC will not work with PFA either. - What will happen with `assert(?)`? Assert is special in that it captures the AST at compile time to render it in the error message. So specifically: $x = assert(?); assert(false); // How will the AssertionError look like? Best regards Tim Düsterhus