|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-10-14 15:32 UTC] bogunov at gmail dot com
-PHP Version: 5.3.3
+PHP Version: 5.3.2
[2010-10-14 15:32 UTC] bogunov at gmail dot com
[2010-10-14 16:09 UTC] salathe@php.net
-Status: Open
+Status: Feedback
-Type: Bug
+Type: Documentation Problem
[2010-10-14 16:09 UTC] salathe@php.net
[2010-10-14 23:28 UTC] bogunov at gmail dot com
-Status: Feedback
+Status: Closed
[2010-10-14 23:28 UTC] bogunov at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 16:00:01 2025 UTC |
Description: ------------ Documentation says it should return new Object thought it returns modified old. PHP 5.3.2 (cli) (built: Mar 3 2010 20:36:54) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans Test script: --------------- $day_interval = new DateInterval('P1D'); $cur_date = new DateTime('2000-01-02'); echo $cur_date->add($day_interval)->format('Y-m-d'); echo $cur_date->sub($day_interval)->format('Y-m-d'); Expected result: ---------------- 2000-01-03 2000-01-01 Actual result: -------------- 2000-01-03 2000-01-02