note 102521 added to class.dateinterval
[email protected] Fri, 18 Feb 2011 12:42:23 -0800
| Newsgroups | php.notes |
|---|---|
| Message-ID | <[email protected]> |
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