fork(2) download
<?php

// your code goes here
        $date = new \DateTime('2016-12-01');
        $weekly_array[] = $date->format('Y-m-d');

        for ($i = 0; $i < 16; $i++) {
            $date->modify('+1 week');
            $weekly_array[] = $date->format('Y-m-d');
        }
        print_r($weekly_array);
Success #stdin #stdout 0.03s 52432KB
stdin
Standard input is empty
stdout
Array
(
    [0] => 2016-12-01
    [1] => 2016-12-08
    [2] => 2016-12-15
    [3] => 2016-12-22
    [4] => 2016-12-29
    [5] => 2017-01-05
    [6] => 2017-01-12
    [7] => 2017-01-19
    [8] => 2017-01-26
    [9] => 2017-02-02
    [10] => 2017-02-09
    [11] => 2017-02-16
    [12] => 2017-02-23
    [13] => 2017-03-02
    [14] => 2017-03-09
    [15] => 2017-03-16
    [16] => 2017-03-23
)