3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $start = new DateTime('2008-12-31 00:00'); $end = new DateTime('2009-02-01 00:00'); $point = $start; while($point <= $end){ echo $point->format('YW') . "\n"; $point = $point->modify('next week'); }
based on mhJNt
Output for 5.5.0 - 7.3.0alpha1
200801 200902 200903 200904 200905