3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = new Datetime('now', new DateTimeZone('CET')); echo $date->format('Y-m-d H:i:s'); echo PHP_EOL; $date = new Datetime('now', new DateTimeZone('EST')); echo $date->format('Y-m-d H:i:s'); echo PHP_EOL; $date = new Datetime('now', new DateTimeZone('PST')); echo $date->format('Y-m-d H:i:s');
Output for 5.6.28, 7.0.12 - 7.1.0
2014-02-27 21:16:59 2014-02-27 15:16:59 2014-02-27 12:16:59
Output for 7.0.6
2016-05-03 14:27:44 2016-05-03 08:27:44 2016-05-03 05:27:44
Output for 5.5.33 - 5.5.34, 5.6.19, 7.0.4 - 7.0.5
2016-04-12 23:57:06 2016-04-12 17:57:06 2016-04-12 14:57:06
Output for 5.5.31 - 5.5.32, 5.6.17 - 5.6.18, 7.0.1 - 7.0.3
2016-04-12 23:57:07 2016-04-12 17:57:07 2016-04-12 14:57:07
Output for 5.5.30, 5.6.14 - 5.6.16, 7.0.0
2016-04-12 23:57:09 2016-04-12 17:57:09 2016-04-12 14:57:09
Output for hhvm-3.12.0
2016-04-13 00:57:06 2016-04-12 17:57:06 2016-04-12 15:57:06
Output for hhvm-3.10.0
2016-04-13 00:57:09 2016-04-12 17:57:09 2016-04-12 15:57:09
Output for 5.6.21
2016-05-02 09:39:11 2016-05-02 03:39:11 2016-05-02 00:39:11
Output for 5.6.20
2016-04-12 23:57:05 2016-04-12 17:57:05 2016-04-12 14:57:05
Output for 5.5.29, 5.6.12 - 5.6.13
2016-04-12 23:57:10 2016-04-12 17:57:10 2016-04-12 14:57:10
Output for 5.5.26 - 5.5.28, 5.6.11
2016-04-12 23:57:11 2016-04-12 17:57:11 2016-04-12 14:57:11
Output for 5.5.25, 5.6.9 - 5.6.10
2016-04-12 23:57:12 2016-04-12 17:57:12 2016-04-12 14:57:12
Output for 5.5.23 - 5.5.24, 5.6.7 - 5.6.8
2016-04-12 23:57:13 2016-04-12 17:57:13 2016-04-12 14:57:13
Output for 5.5.21 - 5.5.22, 5.6.5 - 5.6.6
2016-04-12 23:57:14 2016-04-12 17:57:14 2016-04-12 14:57:14
Output for 5.5.18 - 5.5.20, 5.6.3 - 5.6.4
2016-04-12 23:57:15 2016-04-12 17:57:15 2016-04-12 14:57:15
Output for 5.5.16, 5.6.0 - 5.6.2
2016-04-12 23:57:16 2016-04-12 17:57:16 2016-04-12 14:57:16
Output for 5.5.35
2016-05-22 14:18:50 2016-05-22 08:18:50 2016-05-22 05:18:50
Output for 5.5.14 - 5.5.15
2016-04-12 23:57:17 2016-04-12 17:57:17 2016-04-12 14:57:17
Output for 5.5.11 - 5.5.13
2016-04-12 23:57:18 2016-04-12 17:57:18 2016-04-12 14:57:18
Output for 5.5.10
2016-04-12 23:57:19 2016-04-12 17:57:19 2016-04-12 14:57:19
Output for 5.4.24 - 5.4.25, 5.5.8 - 5.5.9
2016-04-13 00:57:19 2016-04-12 18:57:19 2016-04-12 15:57:19
Output for 5.3.28, 5.4.21 - 5.4.23, 5.5.5 - 5.5.7
2016-04-13 00:57:20 2016-04-12 18:57:20 2016-04-12 15:57:20
Output for 5.4.18 - 5.4.20, 5.5.2 - 5.5.4
2016-04-13 00:57:21 2016-04-12 18:57:21 2016-04-12 15:57:21
Output for 5.3.26 - 5.3.27, 5.4.16 - 5.4.17, 5.5.0 - 5.5.1
2016-04-13 00:57:22 2016-04-12 18:57:22 2016-04-12 15:57:22
Output for 5.4.45
2016-04-13 00:57:10 2016-04-12 18:57:10 2016-04-12 15:57:10
Output for 5.4.43 - 5.4.44
2016-04-13 00:57:11 2016-04-12 18:57:11 2016-04-12 15:57:11
Output for 5.4.41 - 5.4.42
2016-04-13 00:57:12 2016-04-12 18:57:12 2016-04-12 15:57:12
Output for 5.4.39 - 5.4.40
2016-04-13 00:57:13 2016-04-12 18:57:13 2016-04-12 15:57:13
Output for 5.4.36 - 5.4.38
2016-04-13 00:57:14 2016-04-12 18:57:14 2016-04-12 15:57:14
Output for 5.4.35
2016-04-13 00:57:15 2016-04-12 18:57:15 2016-04-12 15:57:15
Output for 5.4.34
2016-04-13 00:57:16 2016-04-12 18:57:16 2016-04-12 15:57:16
Output for 5.3.29, 5.4.29 - 5.4.32
2016-04-13 00:57:17 2016-04-12 18:57:17 2016-04-12 15:57:17
Output for 5.4.26 - 5.4.28
2016-04-13 00:57:18 2016-04-12 18:57:18 2016-04-12 15:57:18
Output for 5.3.23 - 5.3.25, 5.4.12 - 5.4.15
2016-04-13 00:57:23 2016-04-12 18:57:23 2016-04-12 15:57:23
Output for 5.3.20 - 5.3.22, 5.4.9 - 5.4.11
2016-04-13 00:57:24 2016-04-12 18:57:24 2016-04-12 15:57:24
Output for 5.3.17 - 5.3.19, 5.4.6 - 5.4.8
2016-04-13 00:57:25 2016-04-12 18:57:25 2016-04-12 15:57:25
Output for 5.3.14 - 5.3.16, 5.4.3 - 5.4.5
2016-04-13 00:57:26 2016-04-12 18:57:26 2016-04-12 15:57:26
Output for 5.3.11 - 5.3.13, 5.4.0 - 5.4.2
2016-04-13 00:57:27 2016-04-12 18:57:27 2016-04-12 15:57:27
Output for 5.3.5 - 5.3.10
2016-04-13 00:57:28 2016-04-12 18:57:28 2016-04-12 15:57:28
Output for 5.2.14 - 5.2.17, 5.3.2 - 5.3.4
2016-04-13 00:57:29 2016-04-12 18:57:29 2016-04-12 15:57:29
Output for 5.2.9 - 5.2.13, 5.3.0 - 5.3.1
2016-04-13 00:57:30 2016-04-12 18:57:30 2016-04-12 15:57:30
Output for 5.2.3 - 5.2.8
2016-04-13 00:57:31 2016-04-12 18:57:31 2016-04-12 15:57:31
Output for 5.2.0 - 5.2.2
2016-04-13 00:57:32 2016-04-12 18:57:32 2016-04-12 15:57:32
Output for 5.0.0 - 5.1.6
<br /> <b>Fatal error</b>: Class 'Datetime' not found in <b>/in/icgYV</b> on line <b>3</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.4.9
<br /> <b>Fatal error</b>: Cannot instantiate non-existent class: datetime in <b>/in/icgYV</b> on line <b>3</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<br /> <b>Fatal error</b>: Cannot instantiate non-existent class: datetime in <b>/in/icgYV</b> on line <b>3</b><br />