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

From: Date: Mon, 05 Oct 2026 14:53:43 +0000
Subject: Re: [RFC] Time\Instant and Time\Clock
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-132796@lists.php.net to get a copy of this message
Hey Tim, On 05.10.26 22:05, Tim Düsterhus wrote:
Why would this not become an always bundled ext/time?
For the “always enabled” extensions it doesn't really matter *where* the code is located and the (observable) end result for the user is the same (except for ReflectionExtension). Time\Duration went into ext/date for simplicity, since timelib is already properly wired into ext/date.
It matters how code is organised. Patterns, assumptions, cognitive load, these, that. I think that's important. A "doesn't really matter *where*" approach is what brings code where core is. I would find it more natural to look at the namespace Time, and find an ext/time. Me getting confused in my last mail shows it nicely. My mail was in draft since you opened the discussion, today I found time to answer and whoops mixed up the polling follow up commit with where things actually live. :)
That is accurate.
If "doesn't really matter *where*" stands, then it cannot hurt to separate it. So: why _not_ doing it? --- Cheers Nick

« previous php.internals (#132796) next »