3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime(); echo $date->format('w'); echo " - "; echo $date->format('Y-m-d H:i:s'); ?>
based on VcVlr
Output for 5.6.28, 7.0.20 - 7.2.0
3 - 2016-01-20 13:29:38
Output for 7.0.6
6 - 2016-05-21 14:04:40
Output for 7.0.5
0 - 2016-04-03 09:59:02
Output for 7.0.4
4 - 2016-03-10 22:07:04
Output for 7.0.3
5 - 2016-03-18 23:42:05
Output for 7.0.2
3 - 2016-03-23 05:49:38
Output for 7.0.1
4 - 2016-03-24 08:51:37
Output for 7.0.0
0 - 2016-03-27 10:44:31
Output for 5.6.21
1 - 2016-05-02 16:54:01
Output for 5.6.20
0 - 2016-04-10 09:01:27
Output for 5.6.19
2 - 2016-03-08 06:16:59
Output for 5.6.18
2 - 2016-03-15 15:16:17
Output for 5.6.17
0 - 2016-03-20 02:48:28
Output for 5.6.16
1 - 2016-03-28 11:34:15
Output for 5.6.15
2 - 2016-03-29 12:24:05
Output for 5.6.14
4 - 2016-04-14 18:06:35
Output for 5.6.13
5 - 2016-04-15 18:45:50
Output for 5.6.12
3 - 2016-04-20 09:16:11
Output for 5.6.11
0 - 2016-04-24 15:42:04
Output for 5.6.10
1 - 2016-04-25 17:47:45
Output for 5.6.9
3 - 2016-04-27 23:16:03
Output for 5.6.8
6 - 2016-04-30 07:41:59
Output for 5.5.35
1 - 2016-05-23 02:59:42
Output for 5.5.34
1 - 2016-04-11 11:16:18
Output for 5.5.33
3 - 2016-03-09 09:22:16
Output for 5.5.32
4 - 2016-03-17 19:15:31
Output for 5.5.31
1 - 2016-03-21 06:02:28
Output for 5.5.30
5 - 2016-04-01 14:15:13
Output for 5.5.29
0 - 2016-04-17 09:03:17
Output for 5.5.28
4 - 2016-04-21 12:35:38
Output for 5.5.27
5 - 2016-04-22 14:12:55
Output for 5.5.26
2 - 2016-04-26 20:29:27
Output for 5.5.25
5 - 2016-04-29 03:56:23
Output for 5.5.24
2 - 2016-05-24 10:28:01
Output for 5.4.44 - 5.4.45
3 - 2016-01-20 13:29:41
Output for 5.4.42 - 5.4.43
3 - 2016-01-20 13:29:42
Output for 5.4.40 - 5.4.41
3 - 2016-01-20 13:29:43
Output for 5.4.39
3 - 2016-01-20 13:29:44
Output for 5.4.36 - 5.4.38
3 - 2016-01-20 13:29:45
Output for 5.4.34 - 5.4.35
3 - 2016-01-20 13:29:46
Output for 5.3.29, 5.4.31 - 5.4.32
3 - 2016-01-20 13:29:47
Output for 5.4.27 - 5.4.30
3 - 2016-01-20 13:29:48
Output for 5.4.23 - 5.4.26
3 - 2016-01-20 13:29:49
Output for 5.3.28, 5.4.20 - 5.4.22
3 - 2016-01-20 13:29:50
Output for 5.3.27, 5.4.17 - 5.4.19
3 - 2016-01-20 13:29:51
Output for 5.3.24 - 5.3.26, 5.4.13 - 5.4.16
3 - 2016-01-20 13:29:52
Output for 5.3.22 - 5.3.23, 5.4.12
3 - 2016-01-20 13:29:53