Re: [RFC] Clone with v2

From: Date: Wed, 14 May 2025 23:26:13 +0000
Subject: Re: [RFC] Clone with v2
References: 1 2  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Wed, May 14, 2025 at 10:06 PM Matthew Weier O'Phinney <
[email protected]> wrote:

> The only question that arose for me is: what happens if a property name
is provided to clone() that does not exist in the class definition; what
will be the behavior at that time? Will an exception or error be thrown? If
so, will it be a new one, or an existing one?

Thank you for the question. I had that one myself looking at the
initial implementation and forgot to write that down more explicitly.

Tim already answered and linked the test, but I've also added an example to
the RFC.

-- 
Volker Dusch
Head of Engineering
Tideways GmbH
Königswinterer Str. 116
53227 Bonn
https://tideways.io/imprint

Sitz der Gesellschaft: Bonn
Geschäftsführer: Benjamin Außenhofer (geb. Eberlei)
Registergericht: Amtsgericht Bonn, HRB 22127


Thread (26 messages)

« previous php.internals (#127367) next »