Re: [PHP-DEV] [RFC] Duration class

[email protected] (Holly Schilling) Fri, 17 Jul 2026 14:01:08 +0000
Newsgroups php.internals
Message-ID <DS4PR20MB99453337C166C4924CAA8CCF19B2C62@DS4PR20MB994533.namprd20.prod.outlook.com>
> 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