3v4l.org

run code in 200+ PHP versions simultaneously
<?php error_reporting( -1 ); date_default_timezone_set( "Europe/Bratislava" ); for ( $i = 0; $i < 7; $i++ ) { $base = strtotime( "2017-01-08 +$i days 12:00:00" ); $weekday = 'Friday'; $relative = strtotime( "$weekday this week 12:00:00", $base ); echo "Base : ".date( "l Y/m/d", $base ), "\n", "Relative: ".date( "l Y/m/d", $relative ), "\n\n"; }
based on WMUKR
Output for 7.0.20, 7.1.5 - 7.4.0
Base : Sunday 2017/01/08 Relative: Friday 2017/01/06 Base : Monday 2017/01/09 Relative: Friday 2017/01/13 Base : Tuesday 2017/01/10 Relative: Friday 2017/01/13 Base : Wednesday 2017/01/11 Relative: Friday 2017/01/13 Base : Thursday 2017/01/12 Relative: Friday 2017/01/13 Base : Friday 2017/01/13 Relative: Friday 2017/01/13 Base : Saturday 2017/01/14 Relative: Friday 2017/01/13
Output for 5.6.23 - 5.6.29, 7.0.8 - 7.0.14, 7.1.0
Base : Sunday 2017/01/08 Relative: Monday 2017/01/02 Base : Monday 2017/01/09 Relative: Friday 2017/01/13 Base : Tuesday 2017/01/10 Relative: Friday 2017/01/13 Base : Wednesday 2017/01/11 Relative: Friday 2017/01/13 Base : Thursday 2017/01/12 Relative: Friday 2017/01/13 Base : Friday 2017/01/13 Relative: Friday 2017/01/13 Base : Saturday 2017/01/14 Relative: Friday 2017/01/13
Output for 5.6.0 - 5.6.22, 7.0.0 - 7.0.7
Base : Sunday 2017/01/08 Relative: Friday 2017/01/13 Base : Monday 2017/01/09 Relative: Friday 2017/01/13 Base : Tuesday 2017/01/10 Relative: Friday 2017/01/13 Base : Wednesday 2017/01/11 Relative: Friday 2017/01/13 Base : Thursday 2017/01/12 Relative: Friday 2017/01/13 Base : Friday 2017/01/13 Relative: Friday 2017/01/13 Base : Saturday 2017/01/14 Relative: Friday 2017/01/13