title: PHP revert DateInterval back to string
body: <p>The php class DateInterval has its specific format of input such as</p>
  
  <pre><code>new DateInterval('P2Y4DT6H8M');
  </code></pre>
  
  <p>Is there any way to revert it, meaning to get from the <code>DateInterval</code> instance the originally formatted input:</p>
  
  <pre><code>'P2Y4DT6H8M'
  </code></pre>
  
  <p>(for example to be stored in database)?</p>