title: Date variables being assigned with 'reference' improperly?
body: <p>I am experiencing something that seems odd to me, would like a second opinion on it.</p>
  
  <p>It seems like my date variables are applying 'reference' during assignment when they should not be.</p>
  
  <p>Example:</p>
  
  <pre><code>$date1 = date_create('2014-09-20');
  
  $date2 = $date1;
  
  date_add($date2,date_interval_create_from_date_string("1 month"));
  
  // I would expect this to print "2014-09-20". However it is printing "2014-10-20"
  echo date_format($date1,'Y-m-d') . "&lt;br&gt;";
  
  //I would expect this to print "2014-10-20". It does so.
  echo date_format($date2,'Y-m-d') . "&lt;br&gt;";
  </code></pre>
  
  <p>Basically, any time I'm changing $date2, it is also changing the value stored in $date1.</p>
  
  <p>Am I insane? Is this proper behavior? Is there something wrong with my compiler? Something in php.ini? Do I just not understand some very simple concept with PHP syntax?</p>
  
  <p>I am using PHP 5.3.28 on IIS 7.5.7600, Windows 7. Accessing the page via Firefox 32 or whatever jacked up current version # they've gotten to now...</p>
  
  <p>I have tried this with "New Datetime"/Add(New DateInterval) method, and with date_create/date_add as in the sample above. Tried creating the vars first and then assigning them.. Same results. Tried adding '&amp;' to the assignment just to see what happens. Same result.</p>
  
  <p>I am having no troubles with the same pattern and using ints:</p>
  
  <pre><code>$int1 = 1;
  
  $int2 = $int1;
  
  $int2 = $int2 + 1;
  
  echo "$int1 &lt;br&gt;"; //prints 1
  
  echo "$int2 &lt;br&gt;"; //prints 2
  </code></pre>
  
  <p>It is behaving as if there are references/pointers on the date vars, even though none are specified.</p>
  
  <p>Thanks for any help..</p>