3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = new \DateTime('500 years ago'); echo $date->format('Y-m-d H:i:s');
based on XWqCE
Output for 5.6.28, 7.0.14 - 7.1.0
1514-10-13 12:54:26
Output for 7.0.6
1516-05-03 10:24:24
Output for 7.0.5
1516-04-02 23:10:28
Output for 7.0.4
1516-03-10 09:46:54
Output for 7.0.3
1516-03-18 10:26:43
Output for 7.0.2
1516-03-22 16:25:14
Output for 7.0.1
1516-03-23 21:00:35
Output for 7.0.0
1516-03-26 22:32:58
Output for hhvm-3.12.0
1516-03-12 13:10:22
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.21
1516-05-02 05:43:52
Output for 5.6.20
1516-04-09 22:10:00
Output for 5.6.19
1516-03-07 17:54:08
Output for 5.6.18
1516-03-15 02:00:19
Output for 5.6.17
1516-03-19 14:40:19
Output for 5.6.16
1516-03-28 00:30:02
Output for 5.6.15
1516-03-29 01:25:23
Output for 5.6.14
1516-04-02 03:44:24
Output for 5.6.13
1516-04-15 07:38:43
Output for 5.6.12
1516-04-19 21:27:14
Output for 5.6.11
1516-04-23 04:29:10
Output for 5.6.10
1516-04-25 06:13:59
Output for 5.6.9
1516-04-27 11:13:07
Output for 5.6.8
1516-04-29 19:21:27
Output for 5.5.35
1516-05-22 09:31:35
Output for 5.5.34
1516-04-11 00:29:24
Output for 5.5.33
1516-03-08 20:51:06
Output for 5.5.32
1516-03-17 03:34:09
Output for 5.5.31
1516-03-20 17:25:35
Output for 5.5.30
1516-04-01 03:22:05
Output for 5.5.29
1516-04-16 21:45:56
Output for 5.5.28
1516-04-21 00:43:10
Output for 5.5.27
1516-04-22 03:00:46
Output for 5.5.26
1516-04-26 08:40:33
Output for 5.5.25
1516-04-28 14:59:04
Output for 5.5.24
1516-05-23 22:19:07
Output for 5.4.45
1515-09-21 14:52:22
Output for 5.4.44
1515-08-17 08:13:44
Output for 5.4.43
1515-08-17 08:13:39
Output for 5.4.42
1515-07-09 06:16:48
Output for 5.4.41
1515-07-09 06:16:47
Output for 5.4.39 - 5.4.40
1515-07-09 06:16:42
Output for 5.4.38
1515-07-09 06:16:40
Output for 5.4.35 - 5.4.37
1515-07-09 06:16:38
Output for 5.4.34
1515-07-09 06:16:37
Output for 5.4.30 - 5.4.32
1514-10-13 12:54:30
Output for 5.4.9 - 5.4.29
1514-10-13 12:54:31
Output for 5.3.20 - 5.4.8
1514-10-13 12:54:32
Output for 5.3.0 - 5.3.19
1514-10-13 12:54:33
Output for 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/S4lY2 on line 2 1514-10-13 12:54:33
Output for 5.2.0 - 5.2.16
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/S4lY2 on line 2 1514-10-13 12:54:34
Output for 5.0.0 - 5.1.6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/S4lY2 on line 2 Fatal error: Class 'DateTime' not found in /in/S4lY2 on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/S4lY2 on line 2 Fatal error: Cannot instantiate non-existent class: datetime in /in/S4lY2 on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/S4lY2 on line 2 Fatal error: Cannot instantiate non-existent class: datetime in /in/S4lY2 on line 2