3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $d = new DateTime('today midnight'); $d->modify('+10 day'); var_dump($d->format('Ymd H:i:s')); $d = new DateTime(); $d->modify('+10 day'); var_dump($d->format('Ymd H:i:s'));
Output for 5.6.28, 7.0.20 - 7.2.0
string(17) "20160117 00:00:00" string(17) "20160117 13:01:04"
Output for 7.0.6
string(17) "20160531 00:00:00" string(17) "20160531 13:28:15"
Output for 7.0.5
string(17) "20160413 00:00:00" string(17) "20160413 09:29:14"
Output for 7.0.4
string(17) "20160320 00:00:00" string(17) "20160320 21:35:49"
Output for 7.0.3
string(17) "20160328 00:00:00" string(17) "20160328 23:00:38"
Output for 7.0.2
string(17) "20160402 00:00:00" string(17) "20160402 05:13:54"
Output for 7.0.1
string(17) "20160403 00:00:00" string(17) "20160403 08:20:18"
Output for 7.0.0
string(17) "20160406 00:00:00" string(17) "20160406 10:13:40"
Output for 5.6.21
string(17) "20160512 00:00:00" string(17) "20160512 16:22:31"
Output for 5.6.20
string(17) "20160420 00:00:00" string(17) "20160420 08:31:11"
Output for 5.6.19
string(17) "20160318 00:00:00" string(17) "20160318 05:44:18"
Output for 5.6.18
string(17) "20160325 00:00:00" string(17) "20160325 14:41:36"
Output for 5.6.17
string(17) "20160330 00:00:00" string(17) "20160330 02:14:08"
Output for 5.6.16
string(17) "20160407 00:00:00" string(17) "20160407 11:03:09"
Output for 5.6.15
string(17) "20160408 00:00:00" string(17) "20160408 11:52:10"
Output for 5.6.14
string(17) "20160424 00:00:00" string(17) "20160424 17:34:51"
Output for 5.6.13
string(17) "20160425 00:00:00" string(17) "20160425 18:13:57"
Output for 5.6.12
string(17) "20160430 00:00:00" string(17) "20160430 08:43:06"
Output for 5.6.11
string(17) "20160504 00:00:00" string(17) "20160504 15:09:13"
Output for 5.6.10
string(17) "20160505 00:00:00" string(17) "20160505 17:15:00"
Output for 5.6.9
string(17) "20160507 00:00:00" string(17) "20160507 22:41:03"
Output for 5.6.8
string(17) "20160510 00:00:00" string(17) "20160510 07:11:01"
Output for 5.5.35
string(17) "20160602 00:00:00" string(17) "20160602 02:22:50"
Output for 5.5.34
string(17) "20160421 00:00:00" string(17) "20160421 10:45:02"
Output for 5.5.33
string(17) "20160319 00:00:00" string(17) "20160319 08:43:14"
Output for 5.5.32
string(17) "20160327 00:00:00" string(17) "20160327 18:38:25"
Output for 5.5.31
string(17) "20160331 00:00:00" string(17) "20160331 05:23:28"
Output for 5.5.30
string(17) "20160411 00:00:00" string(17) "20160411 13:44:24"
Output for 5.5.29
string(17) "20160427 00:00:00" string(17) "20160427 08:31:45"
Output for 5.5.28
string(17) "20160501 00:00:00" string(17) "20160501 12:02:01"
Output for 5.5.27
string(17) "20160502 00:00:00" string(17) "20160502 13:39:54"
Output for 5.5.26
string(17) "20160506 00:00:00" string(17) "20160506 19:55:53"
Output for 5.5.25
string(17) "20160509 00:00:00" string(17) "20160509 03:21:34"
Output for 5.5.24
string(17) "20160603 00:00:00" string(17) "20160603 09:44:40"
Output for 5.4.45
string(17) "20160117 00:00:00" string(17) "20160117 13:01:06"
Output for 5.4.44
string(17) "20160117 00:00:00" string(17) "20160117 13:01:07"
Output for 5.4.42 - 5.4.43
string(17) "20160117 00:00:00" string(17) "20160117 13:01:08"
Output for 5.4.41
string(17) "20160117 00:00:00" string(17) "20160117 13:01:09"
Output for 5.4.40
string(17) "20160117 00:00:00" string(17) "20160117 13:01:10"
Output for 5.4.36 - 5.4.39
string(17) "20160117 00:00:00" string(17) "20160117 13:01:11"
Output for 5.3.29, 5.4.32 - 5.4.35
string(17) "20160117 00:00:00" string(17) "20160117 13:01:12"
Output for 5.4.27 - 5.4.31
string(17) "20160117 00:00:00" string(17) "20160117 13:01:13"
Output for 5.3.28, 5.4.22 - 5.4.26
string(17) "20160117 00:00:00" string(17) "20160117 13:01:14"
Output for 5.4.18 - 5.4.21
string(17) "20160117 00:00:00" string(17) "20160117 13:01:15"
Output for 5.3.23 - 5.3.27, 5.4.13 - 5.4.17
string(17) "20160117 00:00:00" string(17) "20160117 13:01:16"
Output for 5.3.21 - 5.3.22, 5.4.11 - 5.4.12
string(17) "20160117 00:00:00" string(17) "20160117 13:01:17"