Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125642 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 EB7641A00BD for <internals@lists.php.net>; Fri, 20 Sep 2024 14:09:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1726841495; bh=rW3qyYxBbC7mY45PBKcuqDcnxD03c+WK+NQuWaScFjY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=f25lBgfYdCIWR2Buy9qOu/P+ExFcfMfJCZzmUKf/H8e4hfnzkWl4lovh9x7bmd7Og qBfKPS63b5ci5TbinrzcSwDjhr+sXfKH5AVy343wXIYoa3XPFV92JA2eMIS5aLc38N 2GHo5A2skUizzv6ZckZBn6mg53tbHB/lomzDIBzHA3LvrHT7xsy5grgGSZYkc3YI5W 9pTyK6UNnRyyMZho4rCv5UNawrEr3yvivLJbvsxAYwlLss0HCeVBoLRKUAxqSrOP2N RpWlkBPYeH4gdkh4r9n7UcaYLJaakzTJtJOZ6ckls4QR0GdDQZ1et7G71lsbLBo1yy 7Ux7s4ye4eBhQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C48BB18005B for <internals@lists.php.net>; Fri, 20 Sep 2024 14:11:34 +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.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: <cmbecker69@gmx.de> Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for <internals@lists.php.net>; Fri, 20 Sep 2024 14:11:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1726841362; x=1727446162; i=cmbecker69@gmx.de; bh=rW3qyYxBbC7mY45PBKcuqDcnxD03c+WK+NQuWaScFjY=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=PFkfrhdj5S9/oNcKh5KvLYBAQ0cxC3LNOyy5Lk/8ELc/GUaL1TkyvbGsPLZ/Ktdm qFmcr2fnd6GEQwIOxeJ6Y0avM8NQLfB7sNETyWVhrKb/akQZY+T0f15X0CICrTNjj q2yIiQDA8S9f0q6ZkSGUpPegrDUaZ2t7bZTp/P55V68pX+tx6HmCnUPy80CpLx3WY mOOIkItrDnhKuKwAmZrkZqkneTiQSYJ8DzUOBPfaCgQz6buhvpeBAlRIwi4WQTHnf s3fWsutlOaQKa/erpfkWzkKJCcpmJpYqEtcOpI8mCuLG4F5tRCza05PgLfI5vi/8w Hj1igoiEMhmiVFTExg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.2.130] ([79.251.205.37]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M9Wyy-1suyEn3p1Y-00FsLc; Fri, 20 Sep 2024 16:09:21 +0200 Message-ID: <ac5dca88-4336-4a9a-a6d0-32011b00e6be@gmx.de> Date: Fri, 20 Sep 2024 16:09:22 +0200 Precedence: bulk list-help: <mailto:internals+help@lists.php.net list-unsubscribe: <mailto:internals+unsubscribe@lists.php.net> list-post: <mailto:internals@lists.php.net> List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] [Pre-RFC Discussion] User Defined Operator Overloads (again) Content-Language: de-DE To: "Gina P. Banyard" <internals@gpb.moe>, Jordan LeDoux <jordan.ledoux@gmail.com> Cc: PHP internals <internals@lists.php.net> References: <CAMrTa2E2m00gOoGy5FbvkrLwM1AUP3ZmJXHkxh_R2qEszQ=NWA@mail.gmail.com> <pgOG2R8lXA-Z6fc0wXKWUiZh1-WLqTp-pJoA6sAVn2UgFeRsCK3hNgeQIq7mrgjF4S2f5GPxZBk2d-O1V9KwbMTGC5o95Eo_fO5E-UvpcYs=@gpb.moe> In-Reply-To: <pgOG2R8lXA-Z6fc0wXKWUiZh1-WLqTp-pJoA6sAVn2UgFeRsCK3hNgeQIq7mrgjF4S2f5GPxZBk2d-O1V9KwbMTGC5o95Eo_fO5E-UvpcYs=@gpb.moe> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:nZtPzS0taU0AQ3yn6VUB1FPjAL53LadyEOoTL8x1ZoLNvlXz/e0 pz0WoUenzD+DqRJ3Jxgn0YdQ/YQL8hscCg1/BkJy/Psx27VHyy8uWneVW3bQHojaoiI6G9R 5rakb6lXV/TXbyWkF8NPhmPBy/LJ6cMKjz6cK5oIvkaLyvrjuL13JT/AflKYc+5SQqsk6vn DoTfhuzF3ULTVhQy3ZM3Q== UI-OutboundReport: notjunk:1;M01:P0:ea1cSdbIN28=;q5qyBGczvkVocQ7ftT7e9GeVoi4 QmLDJqHtx7gx65dz7+UOBdFk2gmDchH+2alBlgh96I85oS9I6qVRqyYvhhsnEJwJ5xISiqTnc j1jcMtZHWTXGVCatp+G19eghCTQ9zA8Bdz0UTvYMZDs8D+QAN9fx1io9pW2wp9teowBR7B8aD injjq2pdv5Kws6FYgX4XJba+ioJDUmacObVky0wLkhSaFUmLfT5akXRpJ2jPrtwUfqAP5+WID 3+kq5nRowKdsV0rLnY9sFjmvStaVjvY6sCxDUKOwUoV3Dyd08qSk0WzzzHp5e2y4ZigNki0c3 hsxAWFSIHyEEJXMx9R7HQtmxK2nS8ziIBfaoT2S9jb2BW3B5f9BJ2hyHw1QMMn3Y6KSs4e4GH r4F3/UV66tRLbUU8kKCQBEijkIrdFMoyMIfRL/TF2Te9c1oeZJt7yZ89iSfGUfhHHHexjrHaF Ft6qPJqMesjnP2yU0zJQLtXpAuE9ZJhXEymdrH1IJzxglKVh2nHuQkR9GmzGYFzyIyP4Yd9dw ho8FoDrrq1P0jv3AV3wo52MUrPMp9dqmka4pDlB5cik9hM6MOnAgLfiQdYdfAaZKGp+y7NiAw jMvtPlSit1lVSSGMOi4H+oq2l8vZEQAj+oIDLjiTM2AdkqKfsq8SeUlW/srColF4nW0MXB4tS +QyC8Ft+eFx3z72MREAeVUpjz0+FKvgraYlLpAbcaDFk26qhcwqkWfVDK/ZbOTxmcRwAqaQLC WEaLKTwtuvX+Bzi3uUxqt9pyYuHqGjA+q90bwBQrrvdvZ9f8CUK2t5J0EM21cTCIriCAeDDMC uydyD4dfh/PtgLFnu9VYALgw== From: cmbecker69@gmx.de ("Christoph M. Becker") On 20.09.2024 at 15:00, Gina P. Banyard wrote: > This leads to a rather insane situation where the engine does not assume + is always commutative but does so for *, something which makes no sense as multiplication or product operations are (in the grand scheme of mathematics) rarely commutative. Gosh, I had completely forgotten about ZEND_TRY_BINARY_OBJECT_OPERATION. So I withdraw my statement about the only reasonable way to implement operator overloading in PHP[1], and state that there is no reasonable way to implement operator overloading in PHP at all (excluding comparison and equality operations), since apparently, we cannot even get the *only two* internal bundled classes to properly handle this. Cf. <https://3v4l.org/gksqI/rfc#vgit.master> and <https://3v4l.org/o5Uhh/rfc#vgit.master>. [1] <https://externals.io/message/125550#125621> Christoph