3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php date_default_timezone_set('America/Montevideo'); $hoy = date('d-m-Y H:i:s'); $hoystr = strtotime($hoy); $mañana = date('d-m-Y H:i:s',strtotime('+1 day', $hoystr)); /*echo $hoy; echo "\n"; echo $mañana; echo "\n";*/ echo date('H:i',$hoystr); echo "\n"; echo date('H:i',strtotime(date('H:i',$hoystr))-strtotime('09:00')); echo "\n"; echo "diferencia: ".date('H:i',($hoystr-strtotime('09:00')));
based on gc12r
Output for 5.6.13 - 7.2.0
22:14 10:14 diferencia: 10:14
Output for 5.4.0 - 5.6.12
23:14 11:14 diferencia: 11:14