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

From: Date: Wed, 02 Sep 2020 19:10:55 +0000
Subject: Re: Pass source object to clone like __clone($origThis)
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-111793@lists.php.net to get a copy of this message
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 às 15:41, Michael Voříšek - ČVUT FEL < vorismi3@fel.cvut.cz> escreveu: > Hi, please look at > > > https://stackoverflow.com/questions/63675888/get-original-source-instance-in-cloneµú > Xl,S@çG{XàÁŠ > > > 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üßen / S přátelským pozdravem, > > Michael Voříšek

« previous php.internals (#111793) next »