3v4l.org

run code in 300+ PHP versions simultaneously
<?php $quarters = array( 1 => '01-01', 2 => '04-01', 3 => '07-01', 4 => '10-01' ); $month = date("n"); $currentQuarter = ceil($month / 3); echo 'We are currently in Q'.$currentQuarter.' of '.date("Y")."\n"; $nextQuarter = $currentQuarter+1; if (!isset($quarters[$nextQuarter])) { $nextQuarter = 1; $year = date("Y")+1; } else { $year = date("Y"); } echo 'The first day of the next quarter is '.date("Y-m-d", strtotime($year.'-'.$quarters[$nextQuarter]));

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
149.45 ms | 2024 KiB | 13 Q