How much is the past has been of a date identifies, by php
<p>I want determine how much is the past has been of days, months and years from a date identifies. Unfortunately, my server does not support the php v.5.3, it only supported  php v.5.2. i have code in php v.5.3, what can use it in php v.5.2: What do i do?</p>

<pre><code>&lt;?php
$new_date = '2010/7/11';
$then = DateTime::createFromFormat("Y/m/d",$new_date);
$diff = $then-&gt;diff(new DateTime());
$year_d = $diff-&gt;format("%y"); 
$month_d = $diff-&gt;format("%m"); 
$day_d = $diff-&gt;format("%d");

echo $year_d .' - ' . $month_d .' - ' . $day_d; //OutPut: 2 - 1 - 21
</code></pre>

<p><strong>DEMO:</strong> <a href="http://codepad.viper-7.com/VNM7OX" rel="nofollow">http://codepad.viper-7.com/VNM7OX</a></p>
