Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109288 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 22054 invoked from network); 25 Mar 2020 13:04:06 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 25 Mar 2020 13:04:06 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DCB941804C6 for ; Wed, 25 Mar 2020 04:28:45 -0700 (PDT) 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.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_ENVFROM_END_DIGIT,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.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 25 Mar 2020 04:28:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1585135723; bh=qMHfeobLVszQM2JxEQUaC1qo7SiegqK5JwQvjtdyI1w=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=HbMIYMTGnIVAC1f8CQ3K/QWLvJf/tShH1wa2BHpNk1/ob4EFmXm6Hn6UPoGyunUo2 wZCxeEITcOrJpLamJuqCZHkSaCfjaynvTNzR2VJbK58hwrdppvUcFzyF8mM96Ml2bt mFejb4TOkri2N459xG78ugxYfnNeXoJBVne2Wdec= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.2.130] ([84.179.237.201]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MV67y-1irBrJ0TKQ-00S9ZH; Wed, 25 Mar 2020 12:28:43 +0100 To: jan.h.boehmer@gmx.de, 'PHP internals' References: <003701d6013c$9afe9750$d0fbc5f0$@gmx.de> Message-ID: <379095fd-ba11-4d84-6cab-89905eeab32a@gmx.de> Date: Wed, 25 Mar 2020 12:28:42 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <003701d6013c$9afe9750$d0fbc5f0$@gmx.de> Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:iH8jKubNyt5pvPKoo1pjCw9Kb/HxOQprmmm7+u1MAG9jC2vNl3f NwFld9LJ14ztlNI35kulV7Lpb+KPT4tmjamPt1HFuJ+sqck0Dje8x+Jzdu7KZvK7y/Iywx2 Ikvy2dqCd/0l1U/ImF5qiRSWw0ZdEoIpl2wqvP+vKiAh5Wx2hZ/iYMATd8Q3e5uCK0L344q SgfXfXbDLiQWw7MSlZ+wA== X-UI-Out-Filterresults: notjunk:1;V03:K0:7pyojtNGuxs=:KzEWbYRQygfuwNuQ4zBYpj 39zW2S3ZetFgOhlC0AbxF1+NC0wdG0VmuoXvMY7BZ4ISYkQTt65RjkUzxC0XLiGOXr8y38VVc ny080/82cn0Sjuho1JvBbj80rV9WSeRWV5kV+NlyjJlWnFADFHBQGB4RGZKgY+srmIj3u7p36 1SaDEtecUlwiczwqnZlvL9Ujam1/5bOnyPwMlNLsaLwWSF+eIvwGHtGcZCZRhYQE/MUsJtLb+ pjF6diXqBtCh/sb2lqjGB4G1V77pu7o6rTzUmLTeawA8pdD2d2TBTkSaq1KOmMCq4s6rEbAH0 BHZwfYgEBjv0GP/S2i2OOPGAOg/4MKV3dqRUF2cE+bW2LBXm36R9BrWl8aij0oLn1RJA+4j7L h54HvjmwIEBZseihrPiXl76a6lPgg4i/Dk6mJGQUFOzIP1bgxk2ji8c3lkSkvZJldrd6lh2j/ OQ2IfZC6lkyLgo0LNXbpP71XuCpt2a3dXcLQmMHYyttv3MCqyyeNgfT82R8NaxsGC1Iap+PX0 5RggCNIF11nCs14ey4pNsNdyRVBCpX3ue3GrUaL8BmYenGHsnuwy8Zt44NbubkM2Y//e0uPHM Dkf+cm9ZPqH8ygYDuy1SrCAC4EFlxnt3OFWjslYn6vDHV+rgltUAVRSesEDeoY0Kn1QleUrkV 7rq8U9FddfKlXoNzQ4X+lgef4Wv4rLaba2DLotmXxfWUXhZZLak0NzW/5x4/pzQLDOu+Lg2LH 8+4GoCv3S0zBQ1GIT32Jru7BzPmCFkFYep4QH7XyW3fOZVr+oiOF9GP3yGnmiDREfxcADk/su HSHitx4wblXbpbQOJPWHrYA/mLQJli3h2D02GTIcS4+6CarnB97Z8CeOT+BgRnITEqdlnAEy8 Qd0BbCBPg83NRyD2IvYXEvzCiC5UlTxxaxprUWJD9bYVT0AKq9FeF/9qKHI8r3Av42VLlL5ST NDSLA2k+ttnpYSrcphH8AQeICEeppmOBXj77OWidSUaNl/LI334KyVtOc06UDfEWev6cf7jlX hDhmIcKasVQ8Gakb0IqaN5cz1uRAcVNyIONCojYCzO4jHNBwfVmsuyX4OQkDDrUlJlojyAd8M v/4Xjf2W8D/X54A3K7V165kr/PXhFD09gURilahEmHCi0RvE8dpTRXtlTCqQp57rGnXjvRvhr 6qHPFBAn6FX1eA8PZkzdlsag/XpUA+VdAU3pVD/tOymNs9bSngrRut7cFCapi26v8VpB/2uqi LiM6uRGdqcZFFPv77 Subject: Re: [VOTE] Userspace operator overloading From: cmbecker69@gmx.de ("Christoph M. Becker") On 23.03.2020 at 18:58, jan.h.boehmer@gmx.de wrote: > I have opened voting on > https://wiki.php.net/rfc/userspace_operator_overloading, which allows us= ers > to overload operators in their own classes. It seems to me that the RFC is not sufficiently specific enough regarding the concatenation of instances of classes which implement __toString(). The RFC itself doesn't mention that explicitly, and the backward incompatible changes section states: | As long as the user does not implement, the operator magic functions, | operators on objects will behave in the previous way. However, at least the current implementation raises two notices ("You have to implement the __concat function") when concatenating Stringable objects. A minor issue: in my opinion, introducing PHP_OPERAND_TYPES_NOT_SUPPORTED doesn't make sense. The RFC says: | Handlers can specify return typehints, but note that the return type | has to be nullable (as PHP_OPERAND_TYPES_NOT_SUPPORTED has the value | null). So if we ever wanted to change the value of PHP_OPERAND_TYPES_NOT_SUPPORTED, we'd introduce a BC break. Therefore the constant's value likely will never change, so using NULL directly to signal unsupported operand types would be fine, wouldn't it? =2D- Christoph M. Becker