3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tripStart = new DateTime('01/09/2013'); $tripEnd = new DateTime('02/09/2013'); $nightStart = 23; $nightEnd = 5; $duration = $tripEnd->getTimestamp() - $tripStart->getTimestamp(); var_dump($duration); ?>

preferences:
36.53 ms | 402 KiB | 5 Q