3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $creationTime = \DateTimeImmutable::createFromFormat('Y-m-d H:i:s', '2017-07-10 10:00:00'); $expirationTime = \DateTimeImmutable::createFromFormat('Y-m-d H:i:s', '2017-07-10 11:00:00'); $time = $expirationTime->diff($creationTime); var_dump($time->format('%s'));
based on M1uac
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc3
string(1) "0"