2026-09-15 16:12 UTC
@timwolla@phpc.social @derickr@phpc.social https://bakame-php.github.io/tokei/1.0/duration/ I hope this can give you more ideas for PHP8.7 around duration 😉
Replies (1)
-
@timwolla@phpc.social 2026-09-15 16:40
@nyamsprod@phpc.social @derickr@phpc.social For PHP 8.7, the focus will likely be on adding Instant and Clock. API design wise I would probably follow the Pareto principle for Duration and keep it lean, with userland helpers adding convenience functionality around the native class as a strong foundation: API design for PHP’s stdlib is much more expensive than for userland and the costs of getting it wrong are even larger. The only thing I would add would be ->divideInto(), because that's complicated to get right.