3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html> <html> <head> <title>Mitigation Template summary</title> <meta charset="utf-8" /> <meta name="author" content="Shashender Kumar" /> <meta name="description" content="" /> <style> .container{ margin:0 auto; width:85%; overflow:auto; } table.gridtable { margin:0 auto; width:95%; overflow:auto; font-family: helvetica,arial,sans-serif; font-size:14px; color:#333333; border-width: 1px; border-color: #666666; border-collapse: collapse; text-align: left; } table.gridtable th { border-width: 1px; padding: 6px; background-color: #D4E6F1; border-style: solid; border-color: #666666; } table.gridtable td { border-width: 1px; padding: 8px; border-style: solid; border-color: #666666; } .error { color: white; background-color: red; } </style> </head> <body> <div class="container" id="container"> <table class="gridtable"> <form action="mtSummary.php" method="post"> <h2 style="text-align:center"> Mitigation Template : <?php echo $_GET["mitigationValue"]; ?> </h2> <thead> <tr> <!-- comment out <th>Mitigation Template</th> --> <th style="text-align:center">Counter Measures Enabled</th> </tr> </thead> </form> <?php $mitigVal = $_GET["mitigationValue"]; if (($csvfile = fopen("/home/testice/mt_summary.csv", "r")) !== FALSE) { while (($csvdata = fgetcsv($csvfile, 1000, ",")) !== FALSE) { if ($csvdata[0] == 'Mitigation Template' && $csvdata[1] == 'Countermeasures Enabled') { while (($csvdata = fgetcsv($csvfile, 1000, ",")) !== FALSE) { if($csvdata[0] !== $mitigVal ){ continue; } else { $string1 = $csvdata[1]; $str_arr = explode(" ",$string1); foreach ($str_arr as $value) { echo '<tr>'; echo '<td>' . $value . '</td>'; echo '</tr>'; } } } } } fclose($csvfile); } ?> </table> </div> </body> </html>

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for branch master
<!DOCTYPE html> <html> <head> <title>Mitigation Template summary</title> <meta charset="utf-8" /> <meta name="author" content="Shashender Kumar" /> <meta name="description" content="" /> <style> .container{ margin:0 auto; width:85%; overflow:auto; } table.gridtable { margin:0 auto; width:95%; overflow:auto; font-family: helvetica,arial,sans-serif; font-size:14px; color:#333333; border-width: 1px; border-color: #666666; border-collapse: collapse; text-align: left; } table.gridtable th { border-width: 1px; padding: 6px; background-color: #D4E6F1; border-style: solid; border-color: #666666; } table.gridtable td { border-width: 1px; padding: 8px; border-style: solid; border-color: #666666; } .error { color: white; background-color: red; } </style> </head> <body> <div class="container" id="container"> <table class="gridtable"> <form action="mtSummary.php" method="post"> <h2 style="text-align:center"> Mitigation Template : Warning: Undefined array key "mitigationValue" in /in/LQ15J on line 51 </h2> <thead> <tr> <!-- comment out <th>Mitigation Template</th> --> <th style="text-align:center">Counter Measures Enabled</th> </tr> </thead> </form> Warning: Undefined array key "mitigationValue" in /in/LQ15J on line 60 Warning: fopen(): open_basedir restriction in effect. File(/home/testice/mt_summary.csv) is not within the allowed path(s): (/tmp:/in:/etc) in /in/LQ15J on line 61 Warning: fopen(/home/testice/mt_summary.csv): Failed to open stream: Operation not permitted in /in/LQ15J on line 61 </table> </div> </body> </html>
Output for branch master_jit
<!DOCTYPE html> <html> <head> <title>Mitigation Template summary</title> <meta charset="utf-8" /> <meta name="author" content="Shashender Kumar" /> <meta name="description" content="" /> <style> .container{ margin:0 auto; width:85%; overflow:auto; } table.gridtable { margin:0 auto; width:95%; overflow:auto; font-family: helvetica,arial,sans-serif; font-size:14px; color:#333333; border-width: 1px; border-color: #666666; border-collapse: collapse; text-align: left; } table.gridtable th { border-width: 1px; padding: 6px; background-color: #D4E6F1; border-style: solid; border-color: #666666; } table.gridtable td { border-width: 1px; padding: 8px; border-style: solid; border-color: #666666; } .error { color: white; background-color: red; } </style> </head> <body> <div class="container" id="container"> <table class="gridtable"> <form action="mtSummary.php" method="post"> <h2 style="text-align:center"> Mitigation Template : Warning: Undefined array key "mitigationValue" in /in/LQ15J on line 51 </h2> <thead> <tr> <!-- comment out <th>Mitigation Template</th> --> <th style="text-align:center">Counter Measures Enabled</th> </tr> </thead> </form> Warning: Undefined array key "mitigationValue" in /in/LQ15J on line 60 Warning: fopen(): open_basedir restriction in effect. File(/home/testice/mt_summary.csv) is not within the allowed path(s): (/tmp:/in:/etc) in /in/LQ15J on line 61 Warning: fopen(/home/testice/mt_summary.csv): Failed to open stream: Operation not permitted in /in/LQ15J on line 61 </table> </div> </body> </html>

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page