3v4l.org

run code in 300+ PHP versions simultaneously
<?php $now = new DateTime(); $punchIn = new DateTime(); // 10:55 am $punchIn->setTime(10,55); print_r( (int)$now->diff($punchIn)->format('%h') );

preferences:
54.46 ms | 402 KiB | 5 Q