On Tuesday, 24 September 2024 at 14:34, Christian Schneider 
<cschn...@cschneid.com> wrote:

> Am 14.09.2024 um 17:33 schrieb Gina P. Banyard intern...@gpb.moe:
> 
> > I came across the Directory class while doing some code exploration of 
> > ext/standard.
> > This class is effectively an opaque object for Directory resources, however 
> > it doesn't behave like one, as it has existed since PHP 4.
> > 
> > As such, I am proposing an RFC to turn this class into an opaque object.
> > 
> > RFC: https://wiki.php.net/rfc/directory-opaque-object
> 
> 
> While I understand the other proposed changes (although I'm always a bit wary 
> about the wish to make more and more things final) I was wondering why you 
> would prevent cloning?
> What are the possible downsides in allowing people to get a clone of a 
> Directory object?

Mainly because the current behaviour doesn't do a proper clone.
It still shares a common directory resource with the original object meaning 
that there is spooky action at a distance even thought cloning is meant to 
prevent this.

Best regards,

Gina P. Banyard

Reply via email to