note 78797 deleted from function.date-create by tularis

From: Date: Fri, 02 Nov 2007 07:56:03 +0000
Subject: note 78797 deleted from function.date-create by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-131939@lists.php.net to get a copy of this message
Note Submitter: roelandschoukens at hotmail dot com ---- assignment doesn't yield independent values. <? $today = new DateTime(); $tomorrow = $today; $tomorrow->modify('+1 day'); //both $tomorrow and $today are set to tomorrow echo $today->format("Y-m-d H:i")."<br>"; echo $tomorrow->format("Y-m-d H:i")."<br>"; /* example output: 2007-10-29 11:40 2007-10-29 11:40 */ ?>

« previous php.notes (#131939) next »