Tim Düsterhus and Derick are proposing a new `Time\Duration` class for PHP 8.6 to represent stopwatch-style durations, primarily to improve developer experience for timeout APIs and the new Polling API. The RFC is intentionally minimal, using a seconds + nanoseconds internal representation (similar to Rust's and Java's Duration). Discussion covers design decisions such as why the highest constructor unit is hours, the absence of ISO 8601 re-stringification (deferred to PHP 8.7), and the exclusion of floating-point total methods due to precision/rounding concerns. A community member also raises the question of whether the namespace should be `DateTime` rather than `Time` to avoid future fragmentation.
150 Impressions