- abs: documentation ( source)
- time: documentation ( source)
- round: documentation ( source)
- strtotime: documentation ( source)
<?php
//Calculate number of hours between pass and now
$dayinpass = "2013-06-23 05:09:12";
$today = time();
$dayinpass= strtotime($dayinpass);
echo round(abs($today-$dayinpass)/60/60);