3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime(); $date = new DateTime('00:08:27'); $date->add(new DateInterval('00:08:27')); echo $date->format('H:i:s'); $summ = strtotime("00:08:27") + strtotime("00:01:32"); echo $summ; echo "<br>"; echo gmdate("H:i:s", "3036607799"); echo "<br>"; echo gmdate("H:i:s", $summ);
based on cWDSh
Output for 7.0.0 - 7.3.0beta1
Fatal error: Uncaught Exception: DateInterval::__construct(): Unknown or bad format (00:08:27) in /in/7blgf:5 Stack trace: #0 /in/7blgf(5): DateInterval->__construct('00:08:27') #1 {main} thrown in /in/7blgf on line 5
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught exception 'Exception' with message 'DateInterval::__construct: Invalid interval (00:08:27)' in /in/7blgf:-1 Stack trace: #0 /in/7blgf(-1): DateInterval->__construct() #1 {main}
Process exited with code 255.
Output for hhvm-3.18.5 - 3.21.3
Fatal error: Uncaught exception 'Exception' with message 'DateInterval::__construct: Invalid interval (00:08:27)' in /in/7blgf:5 Stack trace: #0 /in/7blgf(5): DateInterval->__construct() #1 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Fatal error: Uncaught exception 'Exception' with message 'DateInterval::__construct(): Unknown or bad format (00:08:27)' in /in/7blgf:5 Stack trace: #0 /in/7blgf(5): DateInterval->__construct('00:08:27') #1 {main} thrown in /in/7blgf on line 5
Process exited with code 255.