3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting( -1 ); date_default_timezone_set( "Europe/Bratislava" ); for ( $i = 0; $i < 7; $i++ ) { $base = strtotime( "2011/01/17 +$i days 12:00:00" ); $weekday = date( "l", $base ); $relative = strtotime( "$weekday this week 12:00:00", $base ); echo date( "l Y/m/d", $base ), "\n", date( "l Y/m/d", $relative ), "\n\n"; }
Output for 5.6.23 - 5.6.24, 7.0.8 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.32, 7.4.0 - 7.4.25, 8.0.0 - 8.0.12, 8.1rc1 - rc3
Monday 2011/01/17 Monday 2011/01/17 Tuesday 2011/01/18 Tuesday 2011/01/18 Wednesday 2011/01/19 Wednesday 2011/01/19 Thursday 2011/01/20 Thursday 2011/01/20 Friday 2011/01/21 Friday 2011/01/21 Saturday 2011/01/22 Saturday 2011/01/22 Sunday 2011/01/23 Sunday 2011/01/23
Output for 5.6.0 - 5.6.22, 7.0.0 - 7.0.7
Monday 2011/01/17 Monday 2011/01/17 Tuesday 2011/01/18 Tuesday 2011/01/18 Wednesday 2011/01/19 Wednesday 2011/01/19 Thursday 2011/01/20 Thursday 2011/01/20 Friday 2011/01/21 Friday 2011/01/21 Saturday 2011/01/22 Saturday 2011/01/22 Sunday 2011/01/23 Sunday 2011/01/30

preferences:
43.39 ms | 461 KiB | 5 Q