3v4l.org

run code in 300+ PHP versions simultaneously
<?php $currentMonth = date("n"); $currentYear = date("Y"); echo $currentMonth . "\n"; echo $currentYear; $month = $currentMonth; $year = $currentYear; $firstDayOfTheMonth = mktime(0, 0, 0, $month, 1, $year); $d = getdate($firstDayOfTheMonth); // Vasarnap helyett hetfo az elso nap a heten. $dayOfTheWeekOfFirstDayOfTheMonth = (6 + $d["wday"]) % 7 + 1; $totalDaysInCurrentMonth = date("t"); $kellenekUresNapokAHonapVegen = true; echo $firstDayOfTheMonth . "\n"; echo $d . "\n"; echo $dayOfTheWeekOfFirstDayOfTheMonth . "\n"; echo $totalDaysInCurrentMonth . "\n"; ?>

preferences:
32.25 ms | 402 KiB | 5 Q