I have this simple file:
test.php
<?php
$date1='2018-01-09 16:14:01';
$date2='2018-01-09 17:30:04';
$dateS1 = new \DateTime($date1);
$dateS2 = new \DateTime($date2);
$dateDiff = $dateS1->diff($dateS2);
$result = $dateDiff->h . ' horas e ' . $dateDiff->i . ' minutos';
echo $result;
?>
In theory I should return the difference in hours and minutes, however, I only get back a blank page.
Do you think it could be the PHP version on my machine? I use version 5.1.6