note 102521 added to class.dateinterval
| From: | Anonymous at osu1 dot php dot net | Date: | Fri, 18 Feb 2011 20:42:23 +0000 |
| Subject: | note 102521 added to class.dateinterval | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-177128@lists.php.net to get a copy of this message | ||
You cannot use the ++ operator on the DateInterval fields; it has no effect on the field value. To
increase a field value, you have to do it the long way, for example $diff->h = $diff->h + 1;
instead of $diff->h++; (observed in PHP 5.3.1).
----
Server IP: 217.160.235.204
Probable Submitter: 62.216.206.181
----
Manual Page -- http://www.php.net/manual/en/class.dateinterval.php
Edit -- https://master.php.net/note/edit/102521
Del: integrated -- https://master.php.net/note/delete/102521/integrated
Del: useless -- https://master.php.net/note/delete/102521/useless
Del: bad code -- https://master.php.net/note/delete/102521/bad+code
Del: spam -- https://master.php.net/note/delete/102521/spam
Del: non-english -- https://master.php.net/note/delete/102521/non-english
Del: in docs -- https://master.php.net/note/delete/102521/in+docs
Del: other reasons-- https://master.php.net/note/delete/102521
Reject -- https://master.php.net/note/reject/102521
Search -- https://master.php.net/manage/user-notes.php