Re: [RFC] Change Directory class to behave like an opaque object
| From: | Christian Schneider | Date: | Tue, 24 Sep 2024 13:34:32 +0000 |
| Subject: | Re: [RFC] Change Directory class to behave like an opaque object | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-125664@lists.php.net to get a copy of this message | ||
Am 14.09.2024 um 17:33 schrieb Gina P. Banyard <internals@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?
Regards,
- Chris