title: print_r() adds properties to DateTime objects
body: <p>Consider the following code sample:</p>
  
  <pre class="lang-php prettyprint-override"><code>$m_oDate = new DateTime('2013-06-12 15:54:25');
  print_r($m_oDate);
  echo $m_oDate-&gt;date;
  </code></pre>
  
  <p>Since PHP 5.3, this produces (something like) the following output:</p>
  
  <pre class="lang-none prettyprint-override"><code>DateTime Object
  (
      [date] =&gt; 2013-06-12 15:54:25
      [timezone_type] =&gt; 3
      [timezone] =&gt; Europe/Amsterdam
  )
  2013-06-12 15:54:25
  </code></pre>
  
  <p>However the following code:</p>
  
  <pre class="lang-php prettyprint-override"><code>$m_oDate = new DateTime('2013-06-12 15:54:25');
  echo $m_oDate-&gt;date;
  </code></pre>
  
  <p>...simply emits an error:</p>
  
  <pre class="lang-none prettyprint-override"><code>Notice: Undefined property: DateTime::$date in ...
  </code></pre>
  
  <p>Why does <code>print_r()</code> "add" these properties to the object? Note that they are not defined as part of the <code>DateTime</code> class on the <a href="http://php.net/manual/en/class.datetime.php" rel="noreferrer">manual page</a>.</p>