|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2017-09-12 17:06 UTC] richard dot carree dot com at gmail dot com
Description: ------------ Both of DateTime and DateTimeInterface expose `add` method. As "DateTimeInterface is meant so that both DateTime and DateTimeImmutable can be type hinted for", why it does not include `add` method? PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 13 02:00:01 2025 UTC |
Both return an object that implements DateTimeInterface. Couldn't we have something like the following? ``` /** * @return \DateTimeInterface */ public function add(DateInterval $interval); ```