3v4l.org

run code in 300+ PHP versions simultaneously
<?php function lastWeekDay ($mnt) { $result = strtotime("last day of $mnt"); $day = date('D', $result); if ('Sun' === $day) { $result -= 86400 * 2; } if ('Sat' === $day) { $result -= 86400; } return $result; } $weirddate = 45729-12-20T00:00:00.000+00:00; echo date("Y-m-d", strtotime("2011-W17-6"));
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected 'T00' (T_STRING) in /in/ZFNKq on line 16
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING in /in/ZFNKq on line 16
Process exited with code 255.

preferences:
184.48 ms | 1395 KiB | 61 Q