- var_dump: documentation ( source)
- strtotime: documentation ( source)
<?php
$d1 = '2014-10-25 00:00:00';
$d2 = '2014-10-26 00:00:00';
$dt1 = new DateTime($d1);
$dt2 = new DateTime($d2);
var_dump ($dt2->diff($dt1)->d);
var_dump (strtotime($d2)-strtotime($d1));