- var_dump: documentation ( source)
- date_default_timezone_set: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$x = strtotime('2014-01-01') - strtotime('2014-01-01');
var_dump('2014-01-01');
var_dump($x);
echo '<br/>';
date_default_timezone_set('Europe/London');
$date = new DateTime();
$A = $date->format('Y-m-d H:i:s'); echo '<br />';
$date->modify("+64 minutes");
$B = $date->format('Y-m-d H:i:s'); echo '<br />';
echo date('h:i', strtotime($B) - strtotime($A));