note 116219 deleted from class.datetimeinterface by cmb
| From: | cmb@php.net | Date: | Tue, 21 Jul 2015 12:37:43 +0000 |
| Subject: | note 116219 deleted from class.datetimeinterface by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-203152@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
It should be noted that you cannot implement this interface yourself, you'll get a fatal error
(apparently by design). Instead, this interface is (currently) only useful for type checking or type
hinting to allow either DateTime or DateTimeImmutable.
function someFunction(DateTimeInterface $date){
//$date could be either DateTime or DateTimeImmutable
}