3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = date('Y-m-d H:m:s'); $i=0; while($i<10) { $days = $i * 7; echo $date = date('Y-m-d H:m:s', strtotime($date. $days.' days')); $i++; }
Output for 5.1.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
2016-05-11 18:05:322016-05-18 18:05:322016-06-01 18:06:322016-06-22 18:06:322016-07-20 18:07:322016-08-24 18:08:322016-10-05 18:10:322016-11-23 18:11:322017-01-18 18:01:322017-03-22 18:03:32
Output for 4.3.0 - 5.0.5
2016-05-12 18:05:202016-05-13 18:05:272016-05-14 18:05:142016-05-15 18:05:412016-05-16 19:05:482016-05-17 20:05:352016-05-18 21:05:022016-05-19 21:05:092016-05-20 21:05:562016-05-21 22:05:23