note 102193 added to datetime.add
| From: | Anonymous at osu1 dot php dot net | Date: | Tue, 01 Feb 2011 22:16:10 +0000 |
| Subject: | note 102193 added to datetime.add | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-176577@lists.php.net to get a copy of this message | ||
Note that the add() and sub() methods will modify the value of the object you're calling the
method on! This is very untypical for a method that returns a value of its own type. You could
misunderstand it that the method would return a new instance with the modified value, but in fact it
modifies itself! This is undocumented here. (Only a side note on procedural style mentions it, but
it obviously does not apply to object oriented style.)
----
Server IP: 217.160.235.204
Probable Submitter: 83.171.172.168
----
Manual Page -- http://www.php.net/manual/en/datetime.add.php
Edit -- https://master.php.net/note/edit/102193
Del: integrated -- https://master.php.net/note/delete/102193/integrated
Del: useless -- https://master.php.net/note/delete/102193/useless
Del: bad code -- https://master.php.net/note/delete/102193/bad+code
Del: spam -- https://master.php.net/note/delete/102193/spam
Del: non-english -- https://master.php.net/note/delete/102193/non-english
Del: in docs -- https://master.php.net/note/delete/102193/in+docs
Del: other reasons-- https://master.php.net/note/delete/102193
Reject -- https://master.php.net/note/reject/102193
Search -- https://master.php.net/manage/user-notes.php