Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111793 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 75557 invoked from network); 2 Sep 2020 20:06:18 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 2 Sep 2020 20:06:18 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5F6F9180511 for ; Wed, 2 Sep 2020 12:11:14 -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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.52]) (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, 2 Sep 2020 12:11:13 -0700 (PDT) Received: by mail-ot1-f52.google.com with SMTP id g96so232149otb.12 for ; Wed, 02 Sep 2020 12:11:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=shEe+cy9S/LY3/3QrgWFEBeSpiODcbDUlpOmU/QS/uA=; b=e+09QVy/MCE/D89MAwZWHoCNhQPokuV6gE0y1DMqt8hCLucXFwLmNMk0+rqLARcPKC E5F/Vk0eOnsBrdZ+kN3yQkY0r8uKHHr1dZck/cURmLYpioRl8LqlAf4sPFvHPjaRiAoc f1vI6fb5EcQfTFZg2ACFs/qjfugem23JYypibyi2XPu3gIGLrgBTF3TkaSCpgzJheGEc sLugaCbI4dArRTSljxzT7qiG00Ol4rMPn6uUqDWBFmgxCW9sqGjVzlic8RzfDhDdgKQd HOr6E9MhAZ4e5ry3LeZF5MZprqFLd0SrrUvysXijmUGChmZAMEXSwwY3lOFgFd6k2P8H qIdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=shEe+cy9S/LY3/3QrgWFEBeSpiODcbDUlpOmU/QS/uA=; b=thnS5/+J0Ynn41y+3eqibebvLP5yudqaL3482eQVT2kS1Q/MiieDNwdMigzJHtZglX wLZ5CfI5ixamZZRuJp31aT8OQrRmR1SYORIZU5r+fiBZFu5av05tb+wB/DV7ufcRP9V5 vtSqzB0g8wUMj8wMUFCN4hDzuBZ/FzHuZsVWXRwgKPLMvM24Pq5M6oVrGRY1l79OAglb 27oyuafbHANhBP/fx4+4u8Yoogdd/Lbee7zkajjz73ARulOLyadneK0D4lSiaDJ9bxSt vnDsmCWr26OnaiW07M7U/xmCN3tXqG6cbiBDMJTOFYSAbdv4PuRDEZQ+iI2OZ95YkRYK AaTg== X-Gm-Message-State: AOAM532blVp9ihlWbHOcyz2SMpMi2oXVByXWUZdYRLDwyUwelSQgZX1E utFhJZUKcpWZSU3etZBMd4n8vtbOwcMAANYrRLA= X-Google-Smtp-Source: ABdhPJz9tBJQOb2gTfWNx51Z/OLgxmWFiTncEJLFMatfQ7yX2dWqM6RDIPA5iJUpuJgdpPLXSBi7nnLhylobqzNInN0= X-Received: by 2002:a9d:7745:: with SMTP id t5mr6293237otl.114.1599073870846; Wed, 02 Sep 2020 12:11:10 -0700 (PDT) MIME-Version: 1.0 References: <2868e0ed4e7ebc09b568471c913079516f93fd2fc95e97b0ffea192db1e04275@mahalux.com> In-Reply-To: <2868e0ed4e7ebc09b568471c913079516f93fd2fc95e97b0ffea192db1e04275@mahalux.com> Date: Wed, 2 Sep 2020 16:10:55 -0300 Message-ID: To: =?UTF-8?B?TWljaGFlbCBWb8WZw63FoWVrIC0gxIxWVVQgRkVM?= Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000000a9e7b05ae596603" Subject: Re: [PHP-DEV] Pass source object to clone like __clone($origThis) From: david.proweb@gmail.com (David Rodrigues) --0000000000000a9e7b05ae596603 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I understand... seems that `$this` is very confusing inside `__clone()`: when writing, it writes to the clone, when reading it reads from original. Seems valid a new optional parameter definition with the original source. Atenciosamente, David Rodrigues Em qua., 2 de set. de 2020 =C3=A0s 15:41, Michael Vo=C5=99=C3=AD=C5=A1ek - = =C4=8CVUT FEL < vorismi3@fel.cvut.cz> escreveu: > Hi, please look at > > https://stackoverflow.com/questions/63675888/get-original-source-instance= -in-clone > > > do you have anything against updating PHP to pass "instance before > cloned" to any __clone call from php? > > no BC - user may accept this extra argument or declare function > __clone() without any param like now > > With kind regards / Mit freundlichen Gr=C3=BC=C3=9Fen / S p=C5=99=C3=A1te= lsk=C3=BDm pozdravem, > > Michael Vo=C5=99=C3=AD=C5=A1ek --0000000000000a9e7b05ae596603--