3v4l.org

run code in 300+ PHP versions simultaneously
<?php function daysInMonth($month, $year) { $daysBetweenMonths = [0, 31, 59 + ($year%4 === 0), 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]; $prev = $daysBetweenMonths[$month - 1]; $current = $daysBetweenMonths[$month]; return $current - $prev; } for ($y = 2000; $y < 2004; $y++) { for ($m = 1; $m < 13; $m++) { echo 'days in '.$m.'/'.$y.' are :'. daysInMonth($m, $y)."\n"; } echo "\n\n"; }

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
178.3 ms | 3309 KiB | 9 Q