3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL ^ E_NOTICE); ?> <?php if($_GET['submit'] && $_GET['category'] && $_GET['Manufacture']) { //Check whether user presses submit button, enter month, date, year, and category //Ready to get all data needed $start_month= $_GET['month']; $start_date= $_GET['date']; $start_year= $_GET['year']; $year_mfg= $_GET['Manufacture']; $CY=date("jFy", strtotime("-3 Years")); $fromDate = date("jFy", strtotime("-3 Years")); $Cu=date('j-F-Y'); $I=$S-2; $S=date('Y'); $Q=$S-$year_mfg; if(!checkdate($start_month, $start_date, $start_year)){ //IS inputted data valid? $continue = "NO"; } else { $continue = "YES"; }; if($continue == "NO"){ if($Q<=1) { echo '<center>'; echo '<img src="images/IIN.PNG">'; echo "</br>"; echo '<a href="index.php"><img src="images/refresh1.png"></a>'; } else { echo'<center>'; echo '<img src="images/OOW.PNG">'; echo "</br>"; echo '<a href="index.php"><img src="images/refresh2.png"></a>'; }; } } if($continue == "YES"){ $category = $_GET['category']; echo $Cu; echo "<br />"; echo "<h1>Date of Purchase: "; echo $start_dmy = $start_date . "-" . $start_month. "-". $start_year; echo "<h1>Year of Manufacturing: "; echo $year_mfg; echo "<br />"; if($category == 0){ // if user selects "Not listed" then... echo "ohh, I'll check whether u fill all the blanks :) <br/>"; $len_int = $_GET['int']; if(!$len_int) { $len_int = 0; } } else { switch ($category) { case 1: // driving vroom vroom... { $date_modifier = "+2 year"; break; } case 2: // office licensing { $date_modifier = "-2 year"; break; } case 3: //tax certifications { $date_modifier = "+90 days"; } } //Guess this would be enough. for now... } $final_dmy = $start_dmy . $date_modifier; $final_dmy = strtotime ($final_dmy); echo "<br />"; // now we should combine it echo "Customer's Free Support Ends: "; echo $final_dmy = date("j-F-Y", $final_dmy); //finally,. converts the date back to the d F Y format.... e.g.: 08 April 2012 echo "</br>"; echo "</br>"; echo $Q; echo "</br>"; echo "</br>"; echo $Cu; echo "</br>"; echo $final_dmy; echo "</br>"; echo "</br>"; echo $Cu*2; echo "</br>"; echo $Cu-2; echo "<center>"; if ($final_dmy >= $Cu){ // if user selects "Not listed" then... echo $Cu; echo "</br>"; echo $final_dmy; echo 'Inn'; echo "</br>"; echo 'OOW'; echo "</br>"; }elseif($Q<=1){ echo $Cu; echo "</br>"; echo $final_dmy; echo '<img src="images/OOW.PNG">'; echo "</br>"; echo 'OOW'; echo "</br>"; } } ?>
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Warning: Undefined array key "submit" in /in/PaevX on line 4 Warning: Undefined variable $continue in /in/PaevX on line 49
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33

preferences:
323.02 ms | 405 KiB | 460 Q