3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo strftime("%Y %W", strtotime("-1 week", strtotime("2013W01"))) . "\n"; echo strftime("%Y %W", strtotime("+1 week", strtotime("2012W52"))) . "\n"; echo gmdate("Y W", strtotime("2012W53")) . "\n"; echo strftime("%Y %W", strtotime("2012W53")) . "\n"; echo date("Y W", strtotime("2012W53")) . "\n"; ?>
Output for 5.1.0 - 7.1.0
2012 52 2012 53 2012 52 2012 53 2012 01
Output for 5.0.5
2012 51 2012 05 2012 04 2012 04 2012 04
Output for 5.0.0 - 5.0.4
2012 51 2012 05 2012 4 2012 04 2012 4
Output for 4.4.1 - 4.4.9
1969 51 1970 01 1969 01 1970 00 1970 01
Output for 4.3.6 - 4.4.0
1969 51 1970 01 1969 1 1970 00 1970 1
Output for 4.3.0 - 4.3.5
1970 01 1969 1 1970 1