3v4l.org

run code in 300+ PHP versions simultaneously
<?php print_r(getMonth(null)); echo(); print_r(getQuarter(null)); function getMonth($d) { return dtf($d,'n'); } function getQuarter($d) { return ceil( getMonth($d) / 3); } function dtf($date, $format = 'd.m.Y'){ $date = new DateTime($date); return $date->format($format); }
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16
Parse error: syntax error, unexpected ')' in /in/ZMNUJ on line 4
Process exited with code 255.

preferences:
162.52 ms | 1399 KiB | 23 Q