how to find the expired date in php
<p>hi i need to find whether the given date is passed or future.</p>

<pre><code>$elapsedTime = new DateTime('2011-03-15 00:20:00');
$elapsedInt = $elapsedTime-&gt;diff( new DateTime() );
echo ( $elapsedInt-&gt;invert ? 'Future' : 'Past' ) . "&lt;br/&gt;";
</code></pre>

<p>i tried this code but i am getting error because my php version was 5,2.And i cant update.</p>

<p>can any one help me ?</p>
