3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $today=date("D"); $time1=strtotime("now"); $time2=strtotime("11:59pm"); echo date('m-d-Y',strtotime("next Thursday")); echo $today; if ($today=="Tue" || $today=="Wed" ) { $day1="Friday ".date('m-d-Y',strtotime("next Friday")); $day2="Tuesday ".date('m-d-Y',strtotime("next Tuesday")); if ($today=="wed") { $day3="Wednesday ".date('m-d-Y',strtotime("+1 week 1 days")); $day4="Thursday ".date('m-d-Y',strtotime("+1 week 1 days")); } else{ $day3="Wednesday ".date('m-d-Y',strtotime("next Wednesday")); $day4="Thursday ".date('m-d-Y',strtotime("+1 week 1 days")); } } echo "day1 -->".$day1."day2 -->".$day2."day3 -->".$day3."day4 -->".$day4;
Output for 5.1.0 - 5.6.25, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
01-16-2014Wedday1 -->Friday 01-17-2014day2 -->Tuesday 01-21-2014day3 -->Wednesday 01-22-2014day4 -->Thursday 01-23-2014
Output for 4.4.0 - 4.4.9, 5.0.5
01-16-2014Wedday1 -->Friday 01-17-2014day2 -->Tuesday 01-21-2014day3 -->Wednesday 01-15-2014day4 -->Thursday 01-23-2014
Output for 4.3.0 - 4.3.11, 5.0.0 - 5.0.4
01-23-2014Wedday1 -->Friday 01-24-2014day2 -->Tuesday 01-28-2014day3 -->Wednesday 01-22-2014day4 -->Thursday 01-23-2014