note 116219 added to class.datetimeinterface
| From: | Anonymous | Date: | Mon, 24 Nov 2014 14:42:49 +0000 |
| Subject: | note 116219 added to class.datetimeinterface | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-201013@lists.php.net to get a copy of this message | ||
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
}
----
Server IP: 72.52.91.14
Probable Submitter: 66.41.132.88
----
Manual Page -- http://php.net/manual/en/class.datetimeinterface.php
Edit -- https://master.php.net/note/edit/116219
Del: integrated -- https://master.php.net/note/delete/116219/integrated
Del: useless -- https://master.php.net/note/delete/116219/useless
Del: bad code -- https://master.php.net/note/delete/116219/bad+code
Del: spam -- https://master.php.net/note/delete/116219/spam
Del: non-english -- https://master.php.net/note/delete/116219/non-english
Del: in docs -- https://master.php.net/note/delete/116219/in+docs
Del: other reasons-- https://master.php.net/note/delete/116219
Reject -- https://master.php.net/note/reject/116219
Search -- https://master.php.net/manage/user-notes.php