|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #79228 Allow DateTimeInterface to be implemented in userland
Submitted: 2020-02-05 00:59 UTC Modified: 2022-06-05 14:33 UTC
From: eric at ericstern dot com Assigned:
Status: Wont fix Package: Date/time related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2020-02-05 00:59 UTC] eric at ericstern dot com
Since DateTimeInterface has a restriction that it cannot be implemented in user space, certain operations (especially in testing) become unnecessarily difficult. It would be great if a future version of PHP lifted this restriction.

Test script:
--------------- is an example of why this is a real-world issue.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-02-05 01:21 UTC]
Happened during bug #65768 "because ext/date relies on classes implementing it to support certain internal structures".;a=commit;h=5f09944662e09ea0b3f93cfab8702f188955e68c
 [2022-06-05 14:33 UTC]
-Status: Open +Status: Wont fix
 [2022-06-05 14:33 UTC]
This can not be done, as the DateTime extension requires internal information to be present for classes that implement DateTimeInterface, and this internal (C-based) information can not be provided by user-land.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Sep 28 12:01:24 2023 UTC