<?php
require('date.php');
$mydate='2014-11-14 21:35:55';
echo "The Difference between the server's date and $mydate is:<br> ";
echo dateDiff($mydate);
?>
$now = \Carbon\Carbon::now()->toDateString(); // get current time
$a = strtotime("2012-09-21 12:12:22");
$b = strtotime($now);
$minutes = ceil(($a - $b) / 3600); it will get ceiling value
$start = new DateTime('yesterday');
$end = new DateTime('now');
$diffInMinutes = iterator_count(new \DatePeriod($start, new \DateInterval('PT1M'), $end));