3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime(strtotime('Tuesday')); echo $date->format('YY-mm-dd');
based on HX0fb
Output for 7.0.20 - 7.2.0
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1441058400) at position 7 (4): Unexpected character in /in/L2kLG:3 Stack trace: #0 /in/L2kLG(3): DateTime->__construct('1441058400') #1 {main} thrown in /in/L2kLG on line 3
Process exited with code 255.
Output for 7.0.6
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1462226400) at position 7 (4): Unexpected character in /in/L2kLG:3 Stack trace: #0 /in/L2kLG(3): DateTime->__construct('1462226400') #1 {main} thrown in /in/L2kLG on line 3
Process exited with code 255.
Output for 7.0.5
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1459807200) at position 8 (0): Unexpected character in /in/L2kLG:3 Stack trace: #0 /in/L2kLG(3): DateTime->__construct('1459807200') #1 {main} thrown in /in/L2kLG on line 3
Process exited with code 255.
Output for 7.0.4
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1457996400) at position 8 (0): Unexpected character in /in/L2kLG:3 Stack trace: #0 /in/L2kLG(3): DateTime->__construct('1457996400') #1 {main} thrown in /in/L2kLG on line 3
Process exited with code 255.
Output for 7.0.3
12001200-0303-1818
Output for 7.0.2
12001200-0303-2222
Output for 7.0.0 - 7.0.1
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1459202400) at position 7 (4): Unexpected character in /in/L2kLG:3 Stack trace: #0 /in/L2kLG(3): DateTime->__construct('1459202400') #1 {main} thrown in /in/L2kLG on line 3
Process exited with code 255.
Output for 5.2.0 - 5.4.44, 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1441058400) at position 7 (4): Unexpected character' in /in/L2kLG:3 Stack trace: #0 /in/L2kLG(3): DateTime->__construct('1441058400') #1 {main} thrown in /in/L2kLG on line 3
Process exited with code 255.
Output for 5.5.25, 5.6.8 - 5.6.9, 5.6.21
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1462226400) at position 7 (4): Unexpected character' in /in/L2kLG:3 Stack trace: #0 /in/L2kLG(3): DateTime->__construct('1462226400') #1 {main} thrown in /in/L2kLG on line 3
Process exited with code 255.
Output for 5.5.34, 5.6.20
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1460412000) at position 8 (0): Unexpected character' in /in/L2kLG:3 Stack trace: #0 /in/L2kLG(3): DateTime->__construct('1460412000') #1 {main} thrown in /in/L2kLG on line 3
Process exited with code 255.
Output for 5.6.19
16001600-0303-0707
Output for 5.5.33, 5.6.18
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1457996400) at position 8 (0): Unexpected character' in /in/L2kLG:3 Stack trace: #0 /in/L2kLG(3): DateTime->__construct('1457996400') #1 {main} thrown in /in/L2kLG on line 3
Process exited with code 255.
Output for 5.6.17
12001200-0303-1919
Output for 5.6.15 - 5.6.16
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1459202400) at position 7 (4): Unexpected character' in /in/L2kLG:3 Stack trace: #0 /in/L2kLG(3): DateTime->__construct('1459202400') #1 {main} thrown in /in/L2kLG on line 3
Process exited with code 255.
Output for 5.5.30, 5.6.14
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1459807200) at position 8 (0): Unexpected character' in /in/L2kLG:3 Stack trace: #0 /in/L2kLG(3): DateTime->__construct('1459807200') #1 {main} thrown in /in/L2kLG on line 3
Process exited with code 255.
Output for 5.5.29, 5.6.13
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1461016800) at position 7 (8): Unexpected character' in /in/L2kLG:3 Stack trace: #0 /in/L2kLG(3): DateTime->__construct('1461016800') #1 {main} thrown in /in/L2kLG on line 3
Process exited with code 255.
Output for 5.5.26 - 5.5.28, 5.6.10 - 5.6.12
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1461621600) at position 8 (0): Unexpected character' in /in/L2kLG:3 Stack trace: #0 /in/L2kLG(3): DateTime->__construct('1461621600') #1 {main} thrown in /in/L2kLG on line 3
Process exited with code 255.
Output for 5.5.24, 5.5.35
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1464040800) at position 8 (0): Unexpected character' in /in/L2kLG:3 Stack trace: #0 /in/L2kLG(3): DateTime->__construct('1464040800') #1 {main} thrown in /in/L2kLG on line 3
Process exited with code 255.
Output for 5.5.32
12001200-0303-1717
Output for 5.5.31
12001200-0303-2020
Output for 5.4.45
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1441663200) at position 8 (0): Unexpected character' in /in/L2kLG:3 Stack trace: #0 /in/L2kLG(3): DateTime->__construct('1441663200') #1 {main} thrown in /in/L2kLG on line 3
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/L2kLG on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/L2kLG on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/L2kLG on line 3