Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108333 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 1991 invoked from network); 30 Jan 2020 23:11:49 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 30 Jan 2020 23:11:49 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 73655180511 for ; Thu, 30 Jan 2020 13:22:45 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS8560 212.227.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 30 Jan 2020 13:22:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1580419362; bh=dNUuPSj5mKLy3JuFUgdLh7OUp7gZ1QQnguWKes06U9A=; h=X-UI-Sender-Class:From:To:Cc:References:In-Reply-To:Subject:Date; b=B4FbxX7nYGl5tm3eTia4munfvFuGSuqUJib9Knt5Rq3G2vorEu8t5IXLEYvUL/YYX qw0Q46q9aaM1DZ59usbdxbGQmi0nkHW9jjQ74kCF6DO4qxYpaK5n1TON6dQzsjv1qu bKVaQ7u6kGCfn++jRqp3Cveg7P5JrWjf1HLDmPj4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from DESKTOPF2PTDOD ([141.35.40.65]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M1po0-1izT8E1u4u-002HqX; Thu, 30 Jan 2020 22:22:42 +0100 To: "'Nikita Popov'" Cc: "'PHP internals'" References: <00ea01d5d630$b18d4f20$14a7ed60$@gmx.de> In-Reply-To: Date: Thu, 30 Jan 2020 22:22:42 +0100 Message-ID: <001f01d5d7b3$68c18b10$3a44a130$@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQKXoxxQn2bR4QXrsNNx7hJjE1ZW5AKdGYKYpmsx5ZA= Content-Language: de X-Provags-ID: V03:K1:PdFWDHTffpQOiovYg5DcK7Z9fmUZARjROg38EKNz2hEEpMJQ1kH hol54hbQW34g3zlTI4wOOesGrXhW77FWy6wrT5lLo1/noDO3RcY/223C7FK17TQ4TeN4aYU V50UP7f4htY+b9qofl/uGgtQn0toWQTv744aGl7MdgdZR8dNwebps656Qu2TyCbij7BPf11 vemJUATePZtx3lGKWzPrw== X-UI-Out-Filterresults: notjunk:1;V03:K0:v63VMPiMBW4=:dKWIVQpLCWPFxc+9dmm6GX cI33wtVII4KkOiG6W/28QWb/QUpEYBRL9rNnYRCRft77q+8bUeflk94pHqSbe+w741BV4vavf k0NLTzGp0H0F1hOtdN6K6ol7BaYbhZb7ibQ0ebgpLKaDT2dUPKNvb4GK1bDh5cgDh1AEpCqFv LS4ZtDHY5wqaCTTiWcZc4GZ8ih6hXLsSXeceJ5XBdMxhYkov/B6vpTMeXE22FDrFlJ5Nri+MC IDrB8QBk0xGUH6+svViN7UBnKv7cR2xcqRWBcTgG7Rqm2KEzh8UV7nW4onKnbW4sC61ch0y8P rtjoxo0X70itdfClOgRmxzEzYUGpiK3a/akCPV3p/nxElmLyMR5lxi4me1skAg0N1LvNWefdn eox3wc5CMczKb4a2VXxFSBuVQhqX5JyOBwrQqrof5tfXz55/b+FAs89CghFmEbI4F7jtyAoEL vGSjjr52QeB/FsUbFs8AENYlqGKyLuN4ytuFI/KwM/LmvHSw19Krx5XUKLM8AsviairfPHrs2 SEFv+IxLAuCL8UKO88ECwDvaTb6l4YNNnDKoxplYkH0gomrA3sQuaLU+03SvAqPdy6bfr3IG4 sIOrmpiCxdZXRYGM5jqNfGB1CY4dC/Mz2WrDE43IvNH67PbuReDfhxwF74Xhx7EpI86k+683o taxQdsG+ngkmz94+QRG0bNoGcw2mT9f7OmYe5i+FiolaTgr2grD1ND1nI/5PeELpYAQtbZY8y /U+JqBbOeT46rDiit58n0JD4Dtyk3dKJW6EOSm7hRsi6tecDuBPKrRm6DzdUSlgZdvX616nAX MoAqAeIJr/ValFNuz0oN/C9JBZcCAjfVmO0P4ek16ag6UqaP0kLgijnV83k3HF/76NB8ciRHU xWwLRvwjQvTn6OLSSYOw9bzmFsRMUQeF2dSBeLMRgrZfEeEPBmePQideN2SouWAfsGJOFwPsi WAOVC6365D7qlMkG0gqH53ugKIOGZMXxOu21kD8+3Y9zoTi3sNj+ednnFO/TPxoNeU4I4hE0i f4Cc1Tf1fYh4USNk74YxD6jWSK2GdZatRlBSlIi/SlP8l0jXuEtJ8kIQfkG1hyi5hae2n0bqo dAS2F/RPIMkVNa8Tiitnf0rM3j53GBufYZNDKqxaHRtjLnYor9dzEUVXD0gDHKjz8l1Lv7YDj Tza8JKGwT1BvcCcO8mmhYv5zxrtQ7QKf6ZZzX/bJPsVmbnUUFTi1gy4l6YGnGQ1Wde4CM3Md6 L5oe5QCF077vmftan Subject: RE: [PHP-DEV] Operator overloading for userspace objects From: jan.h.boehmer@gmx.de > Unfortunately, this implementation goes in the wrong direction: PHP = already has full internal support for operator overloading through the = do_operation object handler. Operator overloading should be exposed to = userland through that handler as well. I have made another implementation = (https://github.com/jbtronics/php-src/tree/operator_overloading) which = provides an standard handler for do_operation, which calls the functions = in user space. I also removed the __compare magic function from my implementation, so = this can be handled separately. Another thing: What are your opinions on overload the bitwise not = operator (~)? My implementations offers every other bitwise operator and = this one would complete the set of bitwise operators. On the other hand = unary operators does not have much use for objects and maybe encourage = people using them as "shortcut" for calling things on the object, where = an explicit method call would make the intend function more clear. Regards, Jan