Re: Pass source object to clone like __clone($origThis)

From: Date: Thu, 03 Sep 2020 11:48:47 +0000
Subject: Re: Pass source object to clone like __clone($origThis)
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-111812@lists.php.net to get a copy of this message
On Wed, Sep 2, 2020 at 7:41 PM Michael Voříšek - ČVUT FEL < vorismi3@fel.cvut.cz> wrote: > do you have anything against updating PHP to pass "instance before > cloned" to any __clone call from php? > Yes, I think that allowing the original object to be modified by a cloning operation could be the cause for a lot of confusion. If we had a proper way to make it read-only I wouldn't mind, but as is, it doesn't sound like a good idea.

« previous php.internals (#111812) next »