3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $seconds = '00:01:13'; echo strtotime($seconds)."\n"; $dtF = new DateTime("@0"); $dtT = new DateTime("@" . $seconds); echo $dtF->diff($dtT)->format('%a days, %h hours, %i minutes and %s seconds');
based on Zj8vM
Output for 7.0.14 - 7.1.0
1410818473 Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 7.0.6
1462226473 Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 7.0.5
1459548073 Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 7.0.4
1457564473 Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 7.0.3
1458255673 Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 7.0.2
1458601273 Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 7.0.1
1458687673 Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 7.0.0
1458946873 Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for hhvm-3.12.0
1459202473 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct() #1 {main}
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.2.0 - 5.4.32, 5.6.28
1410818473 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.6.21
1462140073 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.6.20
1460152873 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.6.19
1457305273 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.6.18
1457910073 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.6.17
1458342073 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.6.16
1459033273 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.6.15
1459116073 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.6.14
1459548073 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.6.13
1460671273 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.6.12
1461016873 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.6.11
1461362473 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.6.10
1461535273 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.6.9
1461708073 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.6.8
1461880873 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.6.7
1464127273 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.5.35
1463868073 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.5.34
1460239273 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.5.33
1457391673 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.5.32
1458169273 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.5.31
1458428473 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.5.30
1459461673 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.5.29
1460757673 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.5.28
1461103273 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.5.27
1461276073 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.5.26
1461621673 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.5.25
1461794473 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.5.24
1463954473 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.4.39 - 5.4.45
1442786473 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.4.34 - 5.4.38
1426287673 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@00:01:13) at position 3 (:): Unexpected character' in /in/dU1sH:8 Stack trace: #0 /in/dU1sH(8): DateTime->__construct('@00:01:13') #1 {main} thrown in /in/dU1sH on line 8
Process exited with code 255.
Output for 5.0.0 - 5.1.6
1410818473 Fatal error: Class 'DateTime' not found in /in/dU1sH on line 7
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/dU1sH on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/dU1sH on line 9
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `','' or `';'' in /in/dU1sH on line 9
Process exited with code 255.