Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125948 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 qa.php.net (Postfix) with ESMTPS id 4CDA11A00BD for ; Tue, 12 Nov 2024 23:22:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1731453914; bh=yhrJyiMayWGDZ9ldFv+Cjm7eXQhPad9DVcLIsElQaEY=; h=Date:To:From:Cc:Subject:In-Reply-To:References:From; b=giNp/umY2CrqSfOmnAwp+iqcifqQgXzqouoonLMhlIrJnlbwXn/0UZEqQlz1iGJG2 1vwHHePX2losDTmIsLz8zRuSzw2K9CkjJ2XGuZqNuXuT7Qt3UQB1ln4+okPwvq1pfI yHa/vVQSqSJjMymj4s2XNrsDhqHZHiarwWvYzXYNJy2PDbsQIlof1R9xsnSTyW5NQq NolO4DC9aPhYJ4Le9Ea5jF7hBZ9qQktcCwdkeWWZGpWMehwoiiWwmh/EUOFNHn2Q4w nJx3Ux9YyZDGhKyQtfeBlukVfbd4qCW9RlQtHR9G4Q3wlstMSZWXK5CxyoFmbleIjZ 7EvNk+uUyl2jg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 28D36180004 for ; Tue, 12 Nov 2024 23:25:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) 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,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-40136.proton.ch (mail-40136.proton.ch [185.70.40.136]) (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, 12 Nov 2024 23:25:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gpb.moe; s=protonmail2; t=1731453755; x=1731712955; bh=yhrJyiMayWGDZ9ldFv+Cjm7eXQhPad9DVcLIsElQaEY=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=U+M+sPvcri8ZFsb4rgx08w7ra+GA+snUkro0ih52Zn+V9Q1CR2R2JCSU0Af5FxCrh Po2dwvyQOz1jKTEcSRwMDabaYodkAz+XJ2zDNZOofcEibsxLak/O1RtAdUJ2TXu2LQ LPcAtsy8L6vwfw/q+uEPDd1GVJyYxPImwuF4FI75Vi+LYu9dBfuylpXL0yxW64gzsh s/JtNNLMRo5OawbJfkvMvI0tOO5T+u/VySiMbgXu9+rZ/TN/PNx7SCXl42pK7wNBt3 XK6YTl1PEi5HS9N35/WjUkUO1N8SDN3y0hI3xQCTssbeUStH+qj6dDR6j8Uz6xfzm9 muLQkbUdWgQZA== Date: Tue, 12 Nov 2024 23:22:31 +0000 To: Claude Pache Cc: PHP internals Subject: Re: [PHP-DEV] Make Closure covariant to callable Message-ID: In-Reply-To: <461FD462-72A8-42D4-B6A2-CA10AC5CA395@gmail.com> References: <461FD462-72A8-42D4-B6A2-CA10AC5CA395@gmail.com> Feedback-ID: 96993444:user:proton X-Pm-Message-ID: 0035e2e26932f0c8d6bd43a2c4138b8571b54c1c Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: internals@gpb.moe ("Gina P. Banyard") On Tuesday, 12 November 2024 at 16:43, Claude Pache wrote: > But personally, I would be more interested in having a type equivalent to= `callable&object`, that is all objects that implement the `__invoke()` mag= ic method (this is a strict super-type of \Closure). >=20 > =E2=80=94Claude An Invokable interface, similar to Stringable would be the solution to this= . And this is something that Ond=C5=99ej also brought up in the PR. I would be in favour for such an interface (considering the cat is already = out of the bag of auto-implementing things with Stringable). But I don't think I have the time/bandwidth to work on this, so if anyone w= ants something "easy" to work on that would be it. Best regards, Gina P. Banyard