Skip to content

date: Add comparison handler to Time\Duration - #23695

Merged
TimWolla merged 1 commit into
php:masterfrom
TimWolla:time-duration-comparison-handler
Sep 16, 2026
Merged

TimWolla merged 1 commit into
php:masterfrom
TimWolla:time-duration-comparison-handler

Conversation

@TimWolla

Copy link
Copy Markdown
Member

As stated in the RFC:

The Time\Duration class will also implement internal “comparison handlers”,
which means that direct comparisons with operators such as < will work.
Other operators (such as + for addition) will not be overloaded.

As stated in the RFC:

> The Time\Duration class will also implement internal “comparison handlers”,
> which means that direct comparisons with operators such as < will work.
> Other operators (such as + for addition) will not be overloaded.
@TimWolla
TimWolla merged commit 5f9eb6d into php:master Sep 16, 2026
18 checks passed
@TimWolla
TimWolla deleted the time-duration-comparison-handler branch September 16, 2026 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants