3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $val = \DateTime::createFromFormat("H:i:s", "17:30:23"); var_dump($val); $val = new DateTime($val->format('U')); var_dump($val);
based on F6LOT
Output for 7.0.14 - 7.2.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-09-06 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1410017423) at position 7 (4): Unexpected character in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1410017423') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 7.0.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-21 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1463844623) at position 8 (2): Unexpected character in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1463844623') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 7.0.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-14 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1460647823) at position 8 (2): Unexpected character in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1460647823') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 7.0.4
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-10 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1457627423) at position 8 (2): Unexpected character in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1457627423') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 7.0.3
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-18 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1458318623) at position 7 (6): Unexpected character in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1458318623') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 7.0.2
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-22 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1458664223) at position 8 (2): Unexpected character in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1458664223') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 7.0.1
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-23 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1458750623) at position 8 (2): Unexpected character in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1458750623') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 7.0.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-26 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1459009823) at position 7 (8): Unexpected character in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1459009823') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.4.30 - 5.4.32, 5.6.28
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-09-06 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1410017423) at position 7 (4): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1410017423') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.6.21
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-02 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1462203023) at position 7 (0): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1462203023') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.6.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-10 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1460302223) at position 7 (2): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1460302223') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.6.19
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-07 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "8223-03-07 14:57:36.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.18
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-14 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1457973023) at position 8 (2): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1457973023') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.6.17
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-19 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "5023-03-19 14:58:40.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.16
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-27 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1459092623) at position 8 (2): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1459092623') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.6.15
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-28 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1459179023) at position 7 (0): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1459179023') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.6.14
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-14 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1460647823) at position 8 (2): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1460647823') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.6.13
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-15 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1460734223) at position 8 (2): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1460734223') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.6.12
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-20 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1461166223) at position 7 (2): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1461166223') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.6.11
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-24 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1461511823) at position 8 (2): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1461511823') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.6.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-25 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1461598223) at position 8 (2): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1461598223') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.6.9
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-28 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1461857423) at position 8 (2): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1461857423') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.6.8
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-30 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1462030223) at position 8 (2): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1462030223') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.5.35
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-23 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1464017423) at position 7 (4): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1464017423') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.5.34
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-11 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1460388623) at position 8 (2): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1460388623') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.5.33
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-08 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "4623-03-08 14:57:45.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.32
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-17 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1458232223) at position 7 (2): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1458232223') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.5.31
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-20 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "1423-03-20 14:58:49.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.30
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-01 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "4623-04-01 14:59:52.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.29
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-17 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1460907023) at position 8 (2): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1460907023') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.5.28
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-21 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1461252623) at position 7 (6): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1461252623') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.5.27
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-22 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1461339023) at position 7 (0): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1461339023') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.5.26
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-26 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1461684623) at position 8 (2): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1461684623') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.5.25
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-29 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1461943823) at position 8 (2): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1461943823') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.5.24
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-24 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1464103823) at position 7 (8): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1464103823') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.4.45
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-09-09 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1441812623) at position 8 (2): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1441812623') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.4.39 - 5.4.44
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-08-09 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1439134223) at position 7 (2): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1439134223') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.4.38
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-02-22 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1424622623) at position 8 (2): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1424622623') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.4.36 - 5.4.37
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-02-03 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1422981023) at position 8 (2): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1422981023') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.4.35
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-11-14 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1415982623) at position 8 (2): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1415982623') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.4.34
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-11-13 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1415896223) at position 8 (2): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1415896223') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.3.0 - 5.4.29
object(DateTime)#1 (3) { ["date"]=> string(19) "2014-09-06 17:30:23" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1410017423) at position 7 (4): Unexpected character' in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1410017423') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for 5.2.10 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/m6eZi on line 3 Fatal error: Call to undefined method DateTime::createFromFormat() in /in/m6eZi on line 3
Process exited with code 255.
Output for 5.2.0 - 5.2.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/m6eZi on line 3 Fatal error: Call to undefined method DateTime::createfromformat() in /in/m6eZi on line 3
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/m6eZi on line 3 Fatal error: Class 'DateTime' not found in /in/m6eZi on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/m6eZi on line 3 Fatal error: Undefined class name 'datetime' in /in/m6eZi on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/m6eZi on line 3 Fatal error: Undefined class name 'datetime' in /in/m6eZi on line 3