Re: [RFC] Duration class
| From: | Holly Schilling | Date: | Fri, 17 Jul 2026 14:01:08 +0000 |
| Subject: | Re: [RFC] Duration class | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-131995@lists.php.net to get a copy of this message | ||
> Are you aware of my work in this area?
While I’m often oblivious to prior work that’s been done on topics I draft proposals, this was
not the case this time. I read over your proposal a few times before drafting my own.
Your proposal correctly noticed some of the limitations of Structs and calls them out. It attempts
to solve them rather than embracing them as a feature. This is why I heavily focused mine on
separating mutating functionality from non-mutating methods.
We should talk more about this, but hijacking the Durations thread isn’t the place. I only brought
up the topic because Duration is the peak use case for a value type. If we can get Structs and
Duration to both land in PHP 9, I’d love to see Duration benefit from them.
Holly
>
> https://wiki.php.net/rfc/structs-v2
>
> Ilija