3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $firstAvailableCount = 100; $slice = 'monthly'; $countData = array(); $startDateTime = new DateTime("2016-01-01"); $endDateTime = new DateTime("2016-02-02"); fillCountMapPeriod($startDateTime,$endDateTime,$countData,$firstAvailableCount,$slice); function fillCountMapPeriod( DateTime $startDateTime, DateTime $endDateTime, array $countData, $firstAvailableCount, $slice) { if($slice == 'monthly') { $interval = new DateInterval('P1M'); $format = 'm-Y'; $startDateTime = DateTime::createFromFormat($format,$startDateTime->format($format)); } else { $interval = new DateInterval('P1W'); $format = 'W-Y'; } var_dump($startDateTime); if($startDateTime->format($format) == $endDateTime->format($format)) { var_dump($startDateTime->format($format)); return; } $endDateTime->add($interval); var_dump($endDateTime); while($startDateTime <= $endDateTime){ var_dump($startDateTime->format("d-".$format)); $startDateTime->add($interval); } }
based on P7Ded
Output for 7.0.20 - 7.2.0
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-05 19:47:35.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "05-01-2016" string(10) "05-02-2016"
Output for 7.0.6
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-21 13:22:29.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "21-01-2016" string(10) "21-02-2016"
Output for 7.0.5
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-03 09:24:39.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "03-01-2016" string(10) "03-02-2016"
Output for 7.0.4
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-10 21:31:06.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "10-01-2016" string(10) "10-02-2016"
Output for 7.0.3
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-18 22:55:07.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "18-01-2016" string(10) "18-02-2016"
Output for 7.0.2
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-23 05:08:17.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "23-01-2016" string(10) "23-02-2016"
Output for 7.0.1
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-24 08:15:32.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "24-01-2016" string(10) "24-02-2016"
Output for 7.0.0
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-27 10:08:49.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "27-01-2016" string(10) "27-02-2016"
Output for 5.6.21
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-02 16:17:37.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "02-01-2016" string(10) "02-02-2016"
Output for 5.6.20
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-10 08:26:30.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "10-01-2016" string(10) "10-02-2016"
Output for 5.6.19
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-08 05:39:21.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "08-01-2016" string(10) "08-02-2016"
Output for 5.6.18
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-15 14:36:25.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "15-01-2016" string(10) "15-02-2016"
Output for 5.6.17
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-20 02:08:41.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "20-01-2016" string(10) "20-02-2016"
Output for 5.6.16
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-28 10:58:06.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "28-01-2016" string(10) "28-02-2016"
Output for 5.6.15
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-29 11:47:24.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "29-01-2016" string(10) "29-02-2016"
Output for 5.6.14
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-14 17:29:56.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "14-01-2016" string(10) "14-02-2016"
Output for 5.6.13
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-15 18:08:54.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "15-01-2016" string(10) "15-02-2016"
Output for 5.6.12
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-20 08:37:59.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "20-01-2016" string(10) "20-02-2016"
Output for 5.6.11
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-24 15:04:07.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "24-01-2016" string(10) "24-02-2016"
Output for 5.6.10
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-25 17:09:59.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "25-01-2016" string(10) "25-02-2016"
Output for 5.6.9
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-27 22:35:58.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "27-01-2016" string(10) "27-02-2016"
Output for 5.6.8
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-30 07:06:07.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "30-01-2016" string(10) "01-03-2016"
Output for 5.5.35
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-23 02:15:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "23-01-2016" string(10) "23-02-2016"
Output for 5.5.34
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-11 10:40:21.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "11-01-2016" string(10) "11-02-2016"
Output for 5.5.33
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-09 08:38:10.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "09-01-2016" string(10) "09-02-2016"
Output for 5.5.32
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-17 18:32:59.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "17-01-2016" string(10) "17-02-2016"
Output for 5.5.31
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-21 05:17:32.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "21-01-2016" string(10) "21-02-2016"
Output for 5.5.30
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-01 13:39:31.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "01-01-2016" string(10) "01-02-2016" string(10) "01-03-2016"
Output for 5.5.29
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-17 08:26:40.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "17-01-2016" string(10) "17-02-2016"
Output for 5.5.28
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-21 11:56:31.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "21-01-2016" string(10) "21-02-2016"
Output for 5.5.27
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-22 13:35:07.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "22-01-2016" string(10) "22-02-2016"
Output for 5.5.26
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-26 19:50:38.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "26-01-2016" string(10) "26-02-2016"
Output for 5.5.25
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-29 03:15:57.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "29-01-2016" string(10) "29-02-2016"
Output for 5.5.24
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-24 09:39:18.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "24-01-2016" string(10) "24-02-2016"
Output for 5.4.45
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-05 19:47:38.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "05-01-2016" string(10) "05-02-2016"
Output for 5.4.44
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-05 19:47:39.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "05-01-2016" string(10) "05-02-2016"
Output for 5.4.42 - 5.4.43
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-05 19:47:40.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "05-01-2016" string(10) "05-02-2016"
Output for 5.4.41
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-05 19:47:41.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "05-01-2016" string(10) "05-02-2016"
Output for 5.4.39 - 5.4.40
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-05 19:47:42.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "05-01-2016" string(10) "05-02-2016"
Output for 5.4.36 - 5.4.38
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-05 19:47:43.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "05-01-2016" string(10) "05-02-2016"
Output for 5.4.34 - 5.4.35
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-05 19:47:44.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "05-01-2016" string(10) "05-02-2016"
Output for 5.4.31 - 5.4.32
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-05 19:47:45.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "05-01-2016" string(10) "05-02-2016"
Output for 5.4.30
object(DateTime)#4 (3) { ["date"]=> string(26) "2016-01-05 19:47:46.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-02 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "05-01-2016" string(10) "05-02-2016"
Output for 5.4.28 - 5.4.29
object(DateTime)#4 (3) { ["date"]=> string(19) "2016-01-05 19:47:46" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(19) "2016-03-02 00:00:00" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "05-01-2016" string(10) "05-02-2016"
Output for 5.4.24 - 5.4.27
object(DateTime)#4 (3) { ["date"]=> string(19) "2016-01-05 19:47:47" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(19) "2016-03-02 00:00:00" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "05-01-2016" string(10) "05-02-2016"
Output for 5.3.28, 5.4.20 - 5.4.23
object(DateTime)#4 (3) { ["date"]=> string(19) "2016-01-05 19:47:48" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(19) "2016-03-02 00:00:00" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "05-01-2016" string(10) "05-02-2016"
Output for 5.3.27, 5.4.17 - 5.4.19
object(DateTime)#4 (3) { ["date"]=> string(19) "2016-01-05 19:47:49" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(19) "2016-03-02 00:00:00" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "05-01-2016" string(10) "05-02-2016"
Output for 5.3.24 - 5.3.26, 5.4.13 - 5.4.16
object(DateTime)#4 (3) { ["date"]=> string(19) "2016-01-05 19:47:50" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(19) "2016-03-02 00:00:00" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "05-01-2016" string(10) "05-02-2016"
Output for 5.3.21 - 5.3.23, 5.4.11 - 5.4.12
object(DateTime)#4 (3) { ["date"]=> string(19) "2016-01-05 19:47:51" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(19) "2016-03-02 00:00:00" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "05-01-2016" string(10) "05-02-2016"
Output for 5.3.29
object(DateTime)#4 (3) { ["date"]=> string(19) "2016-01-05 19:47:45" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(19) "2016-03-02 00:00:00" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "05-01-2016" string(10) "05-02-2016"