How to Subtract two dates in php

$date_one = "2013-09-02 04:24:25";

$date_two = "2012-09-02 04:24:25";

$to_date = strtotime($date_one);
$from_date = strtotime($date_two);

$date_difference = $to_date- $from_date; // Get date difference between the two dates in number of seconds
$days = floor($date_difference / (24 * 60 * 60 )); // convert to days
echo($days); // print 365