Re: [RFC] Duration class

From: Date: Wed, 08 Jul 2026 00:49:47 +0000
Subject: Re: [RFC] Duration class
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  Groups: php.internals 
Request: Send a blank email to internals+get-131803@lists.php.net to get a copy of this message
Hi Tim, On Tue, Jul 7, 2026 at 9:49 PM Tim Düsterhus <tim@bastelstu.be> wrote: > > If injectivity were the real goal, none of Java, Rust, or Temporal > > would be usable APIs by that standard, they're explicitly > > non-injective by design, and that hasn't stopped them from being the > > reference implementations you're citing as inspiration. > > Yes, *inspiration*. We looked at those to see how others approach the > problem, but of course built our own list of requirements and/or goals > based on constraints imposed by PHP and also based on our experience of > working with dates and times both in PHP and other programming > languages. I wonder, what are the constraints php has for this proposal? And how PHP doing something different than almost any other language is the result of these constraints? Cheers, -- Pierre @pierrejoye

« previous php.internals (#131803) next »