note 89962 added to datetime.modify

From: Date: Tue, 31 Mar 2009 04:04:18 +0000
Subject: note 89962 added to datetime.modify
Groups: php.notes 
Request: Send a blank email to php-notes+get-152640@lists.php.net to get a copy of this message
As far as I can tell, the documentation for date_modify seems to be inconsistent with the functionality exhibited in PHP 5.2.9 (and perhaps other versions) I was trying to figure out why a call to date_modify was returning null in PHP 5.2.9. An older version of the documentation for date_modify at http://php.chinaunix.net/manual/zh/function.date-modify.php (for PHP 5 >= 5.1.0) explains that date_modify returns NULL on success, or FALSE on failure. I suspect the new version of date_modify returns a DateTime object instead of null or false: PRESUMABLY NEW: DateTime date_modify ( DateTime $object , string $modify ) OLD: null/boolean date_modify ( DateTime $object , string $modify ) ---- Server IP: 117.55.229.1 Probable Submitter: 114.76.7.246 ---- Manual Page -- http://www.php.net/manual/en/datetime.modify.php Edit -- https://master.php.net/note/edit/89962 Del: integrated -- https://master.php.net/note/delete/89962/integrated Del: useless -- https://master.php.net/note/delete/89962/useless Del: bad code -- https://master.php.net/note/delete/89962/bad+code Del: spam -- https://master.php.net/note/delete/89962/spam Del: non-english -- https://master.php.net/note/delete/89962/non-english Del: in docs -- https://master.php.net/note/delete/89962/in+docs Del: other reasons-- https://master.php.net/note/delete/89962 Reject -- https://master.php.net/note/reject/89962 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#152640) next »