3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump((new \DateTime())->format('Y-m-d H:i:s'));
Output for 5.6.28, 7.0.14 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.12 - 7.3.31, 7.4.3 - 7.4.33, 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
string(20) "2014-08-07 10:41:19"
Output for 7.3.32 - 7.3.33, 8.0.13
string(20) "2014-08-07 08:41:19"
Output for 7.4.0
string(20) "2014-08-07 10:41:20"
Output for 7.0.6
string(20) "2016-05-03 04:28:43"
Output for 7.0.5
string(20) "2016-04-02 17:38:42"
Output for 7.0.4
string(20) "2016-03-10 03:25:43"
Output for 7.0.3
string(20) "2016-03-18 03:42:15"
Output for 7.0.2
string(20) "2016-03-21 14:12:13"
Output for 7.0.1
string(20) "2016-03-23 14:26:31"
Output for 7.0.0
string(20) "2016-03-26 16:43:36"
Output for 5.6.21
string(20) "2016-05-01 23:32:18"
Output for 5.6.20
string(20) "2016-04-09 12:53:44"
Output for 5.6.19
string(20) "2016-03-07 02:33:55"
Output for 5.6.18
string(20) "2016-03-14 15:29:53"
Output for 5.6.17
string(20) "2016-03-19 08:09:01"
Output for 5.6.16
string(20) "2016-03-27 18:29:46"
Output for 5.6.15
string(20) "2016-03-28 19:22:12"
Output for 5.6.14
string(20) "2016-04-01 21:55:47"
Output for 5.6.13
string(20) "2016-04-15 01:53:56"
Output for 5.6.12
string(20) "2016-04-19 15:03:16"
Output for 5.6.11
string(20) "2016-04-22 22:18:28"
Output for 5.6.10
string(20) "2016-04-24 23:55:41"
Output for 5.6.9
string(20) "2016-04-27 05:08:47"
Output for 5.6.8
string(20) "2016-04-29 12:53:57"
Output for 5.6.7
string(20) "2016-05-25 01:13:41"
Output for 5.5.35
string(20) "2016-05-22 03:02:38"
Output for 5.5.34
string(20) "2016-04-10 18:51:04"
Output for 5.5.33
string(20) "2016-03-08 14:20:15"
Output for 5.5.32
string(20) "2016-03-16 20:06:28"
Output for 5.5.31
string(20) "2016-03-20 11:00:31"
Output for 5.5.30
string(20) "2016-03-31 21:23:34"
Output for 5.5.29
string(20) "2016-04-16 15:58:35"
Output for 5.5.28
string(20) "2016-04-20 18:20:15"
Output for 5.5.27
string(20) "2016-04-21 20:45:03"
Output for 5.5.26
string(20) "2016-04-26 02:27:59"
Output for 5.5.25
string(20) "2016-04-28 08:26:59"
Output for 5.5.24
string(20) "2016-05-23 15:12:00"
Output for 5.4.45
string(20) "2015-09-08 11:00:03"
Output for 5.4.44
string(20) "2015-08-09 20:34:32"
Output for 5.4.43
string(20) "2015-08-09 20:34:27"
Output for 5.4.42
string(20) "2015-08-09 20:34:26"
Output for 5.4.41
string(20) "2015-08-09 20:34:24"
Output for 5.4.40
string(20) "2015-05-13 23:14:01"
Output for 5.4.39
string(20) "2015-05-13 23:14:00"
Output for 5.4.38
string(20) "2015-02-22 16:56:14"
Output for 5.4.36 - 5.4.37
string(20) "2015-02-03 17:30:49"
Output for 5.4.35
string(20) "2014-11-14 11:48:59"
Output for 5.4.34
string(20) "2014-11-13 14:49:49"
Output for 5.4.32
string(20) "2014-08-28 11:09:24"
Output for 5.4.29 - 5.4.31
string(20) "2014-08-07 10:41:23"
Output for 5.4.8 - 5.4.28
string(20) "2014-08-07 10:41:24"
Output for 5.4.0 - 5.4.7
string(20) "2014-08-07 10:41:25"
Output for 5.3.0 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/F8T98 on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/F8T98 on line 3 Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/F8T98 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/F8T98 on line 3 Parse error: parse error, unexpected T_OBJECT_OPERATOR in /in/F8T98 on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/F8T98 on line 3 Parse error: parse error in /in/F8T98 on line 3
Process exited with code 255.

preferences:
258.65 ms | 401 KiB | 314 Q