Re: [RFC] Time\Instant and Time\Clock

From: Date: Mon, 05 Oct 2026 13:57:28 +0000
Subject: Re: [RFC] Time\Instant and Time\Clock
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-132794@lists.php.net to get a copy of this message
Hey Tim, thanks for the RFC. On 22.09.26 22:20, Tim Düsterhus wrote:
following Time\Duration in PHP 8.6, Derick and I created an RFC for Time\Instant and Time\Clock as the next part of the new date and time API: https://wiki.php.net/rfc/time_instant_class
Why would this not become an always bundled ext/time? You called it 'greenfield design', and said 'deliberately don't want to “infect” the new API with ideas from the legacy API'. Yet it lives next to this old code. It was also mentioned that JavaScript's Temporal is roughly where the journey goes, which is quite some scope yet to come. Since this proposed new date/time API will be the successor of the old date/time API, why not also physically & cleanly separate the new from the old stuff? ext/standard is such a kitchen sink already that I wonder why modern successors would not live in a more "sensible" structure. Imagine a (far) future where we could chose to compile PHP with or without legacy stuff -- clean separation would make this easier. As far as my understanding of the policy goes, nothing would forbid making this an extension (see ext/uri)? --- Cheers Nick

« previous php.internals (#132794) next »