Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129879 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 E0ACD1A00BC for ; Fri, 23 Jan 2026 08:37:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1769157466; bh=BTrf8nk7x3rhjUM38gcvC/9ansExcdMf/OjT2YauVUs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=N3Sug+6yZZhFQSddH0NWj463FWahAE989VFyk65uOvIvlDZqpjbhf6L6LX6EumQ6k vFz2O+oGgI3A1hxNnncpn/3VVM87Gm/CFpsxNBySuKFfj6ZgIf+4tAUUHjGpiZjtmn bsklSLUD+e2cdHiMUM0Ux27oZbOXCzc5Hl4bauU3oLdpl7RoCGa6RlqBzOPUKDVkzY zPlmAbdslWhur6rNtCEu0zR3aBgi8PhXRX36EvQKFAeRB0gY6wCtRn2/rs5hDQvgo5 AImN6c9dLubD9pb9/egFas0lGKlcOBAPKeqOlA+rbF2kiH/e8pFzRX7x7+I9pA+8g3 f3b2UTIyKuXVA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D8C7D180003 for ; Fri, 23 Jan 2026 08:37: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=0.6 required=5.0 tests=BAYES_50,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, 23 Jan 2026 08:37:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1769157459; bh=E26mKG3/rDDWDEQXvadhaPyIEhFu4wkFsjUAABCVyZ8=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=MJbwXxTakD+rVf0hurCkX/+bRkawuE5zxYMA0/k0d+3ciU17tM7Z49k3jQBPKaB97 i+1XyR9OGCpCCfL3xXcc0WvPYaTbj0L/52jMQ6krAFvaZo813lauU0ApqI33DaZZ58 qhbXvzvebckUB64pH9nf9sDWnFACiYvwlsJQFrBPL5f0JKqjxGevkO3b5VnsucTvni DLvGG4nMOzXRS6IchvgXmxzfAKAA8AM+11q9xmhXOCXGl4/rD1KI8ZEFJyiG9CBWJj GtnRUij9lAuOEJvDWM95feJBBPFQ2m6LMUM2UJpTw+ymEfwuKcgQT21bp4hk687mt1 T0zeXRA0J07Lw== Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Date: Fri, 23 Jan 2026 09:37:39 +0100 To: Mathieu Rochette Cc: php internals , Arnaud Le Blanc Subject: Re: [PHP-DEV] [RFC] Partial Function Application for instance of non-static methods ("$this") In-Reply-To: References: <64953ec741a4c6609519e1878ad37b54@bastelstu.be> 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 2026-01-22 18:30, schrieb Mathieu Rochette: > I often whished something like this existed :) Didn't get trough to > suggest it because I wasn't sure of the syntax either (and lazyness) Thank you for participating in the discussion of *this* RFC then. Having more voices available helps building things that suit the community best :-) > still, my syntax suggestions: > > array_map(DateTimeImmutable->format("c"), $dates); Unfortunately this doesn't work, because it is a already-legal method call on a method stored in the constant called `DateTimeImmutable`. See: https://3v4l.org/3khkT#veol > I noticed `?->method(?)` was considered; evne if it was possible, I > would prefer if the type was explict, as you may want to use an > interface name (or a union type, etc.) too Union types would likely be unsupported either way, since multiple members of the union could have incompatible signatures for the same method. Interfaces are fully supported with the currently proposed syntax (it's explicitly mentioned in the RFC). Best regards Tim Düsterhus