3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dt = new DateTime('first Monday of this month'); echo $dt->format('W'); $month = "10"; $year = "2014"; $beg = (int) date('W', strtotime("first thursday of $year-$month")); $end = (int) date('W', strtotime("last thursday of $year-$month")); print(join(', ', range($beg, $end)));

preferences:
34.07 ms | 402 KiB | 5 Q