3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = "2015-09-01"; $end = date('Y-m-d', strtotime("$start +1 months")); $period = floor((strtotime($end) - strtotime($start))/(24*60*60)); for($i = 0; $i < $period; $i++){ if(in_array(date('l',strtotime("$start +$i day")),["Monday","Friday"])) echo date('l d M, Y',strtotime("$start +$i day"))."\n"; }

preferences:
44.75 ms | 402 KiB | 5 Q