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>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 64
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 53
Branch analysis from position: 53
2 jumps found. (Code = 44) Position 1 = 61, Position 2 = 16
Branch analysis from position: 61
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 46) Position 1 = 19, Position 2 = 22
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 53
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 45
Branch analysis from position: 45
2 jumps found. (Code = 44) Position 1 = 53, Position 2 = 24
Branch analysis from position: 53
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 29
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 45
Branch analysis from position: 45
Branch analysis from position: 29
2 jumps found. (Code = 77) Position 1 = 37, Position 2 = 44
Branch analysis from position: 37
2 jumps found. (Code = 78) Position 1 = 38, Position 2 = 44
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
Branch analysis from position: 44
2 jumps found. (Code = 44) Position 1 = 53, Position 2 = 24
Branch analysis from position: 53
Branch analysis from position: 24
Branch analysis from position: 44
Branch analysis from position: 53
Branch analysis from position: 22
Branch analysis from position: 64
filename:       /in/LQ15J
function name:  (null)
number of ops:  66
compiled vars:  !0 = $mitigVal, !1 = $csvfile, !2 = $csvdata, !3 = $string1, !4 = $str_arr, !5 = $value
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   1     0  E >   ECHO                                                     '%3C%21DOCTYPE+html%3E%0A%3Chtml%3E%0A%0A++++%3Chead%3E%0A++++++++%3Ctitle%3EMitigation+Template+summary%3C%2Ftitle%3E%0A++++++++%3Cmeta+charset%3D%22utf-8%22+%2F%3E%0A++++++++%3Cmeta+name%3D%22author%22+content%3D%22Shashender+Kumar%22+%2F%3E%0A++++++++%3Cmeta+name%3D%22description%22+content%3D%22%22+%2F%3E%0A++++++++%3Cstyle%3E%0A++++++++++++.container%7B%0A++++++++++++++++margin%3A0+auto%3B%0A++++++++++++++++width%3A85%25%3B%0A++++++++++++++++overflow%3Aauto%3B%0A++++++++++++%7D%0A++++++++++++table.gridtable+%7B%0A++++++++++++++++margin%3A0+auto%3B%0A++++++++++++++++width%3A95%25%3B%0A++++++++++++++++overflow%3Aauto%3B%0A++++++++++++++++font-family%3A+helvetica%2Carial%2Csans-serif%3B%0A++++++++++++++++font-size%3A14px%3B%0A++++++++++++++++color%3A%23333333%3B%0A++++++++++++++++border-width%3A+1px%3B%0A++++++++++++++++border-color%3A+%23666666%3B%0A++++++++++++++++border-collapse%3A+collapse%3B%0A++++++++++++++++text-align%3A+left%3B%0A++++++++++++%7D%0A++++++++++++table.gridtable+th+%7B%0A++++++++++++++++border-width%3A+1px%3B%0A++++++++++++++++padding%3A+6px%3B%0A++++++++++++++++background-color%3A+%23D4E6F1%3B%0A++++++++++++++++border-style%3A+solid%3B%0A++++++++++++++++border-color%3A+%23666666%3B%0A%0A++++++++++++%7D%0A++++++++++++table.gridtable+td+%7B%0A++++++++++++++++border-width%3A+1px%3B%0A++++++++++++++++padding%3A+8px%3B%0A++++++++++++++++border-style%3A+solid%3B%0A++++++++++++++++border-color%3A+%23666666%3B%0A++++++++++++%7D%0A++++++++++++.error+%7B%0A++++++++++++++++color%3A+white%3B%0A++++++++++++++++background-color%3A+red%3B%0A++++++++++++%7D%0A++++++++%3C%2Fstyle%3E%0A++++%3C%2Fhead%3E%0A%3Cbody%3E%0A++++%3Cdiv+class%3D%22container%22+id%3D%22container%22%3E%0A++++++++%3Ctable+class%3D%22gridtable%22%3E%0A++++++++++++%3Cform+action%3D%22mtSummary.php%22+method%3D%22post%22%3E%0A++++++++++++++++%3Ch2+style%3D%22text-align%3Acenter%22%3E+Mitigation+Template+%3A+'
  51     1        FETCH_R                      global              ~6      '_GET'
         2        FETCH_DIM_R                                      ~7      ~6, 'mitigationValue'
         3        ECHO                                                     ~7
         4        ECHO                                                     '+%3C%2Fh2%3E%0A++++++++++++++++%3Cthead%3E%0A++++++++++++++++++++%3Ctr%3E%0A++++++++++++++++%3C%21--+comment+out+++++++%3Cth%3EMitigation+Template%3C%2Fth%3E++++--%3E%0A++++++++++++++++++++++++%3Cth+style%3D%22text-align%3Acenter%22%3ECounter+Measures+Enabled%3C%2Fth%3E%0A++++++++++++++++++++%3C%2Ftr%3E%0A++++++++++++++++%3C%2Fthead%3E%0A++++++++++++%3C%2Fform%3E%0A++++'
  60     5        FETCH_R                      global              ~8      '_GET'
         6        FETCH_DIM_R                                      ~9      ~8, 'mitigationValue'
         7        ASSIGN                                                   !0, ~9
  61     8        INIT_FCALL                                               'fopen'
         9        SEND_VAL                                                 '%2Fhome%2Ftestice%2Fmt_summary.csv'
        10        SEND_VAL                                                 'r'
        11        DO_ICALL                                         $11     
        12        ASSIGN                                           $12     !1, $11
        13        IS_EQUAL                                         ~13     $12, <false>
        14      > JMPZ                                                     ~13, ->64
  62    15    > > JMP                                                      ->53
  63    16    >   FETCH_DIM_R                                      ~14     !2, 0
        17        IS_NOT_EQUAL                                     ~15     ~14, 'Mitigation+Template'
        18      > JMPZ_EX                                          ~15     ~15, ->22
        19    >   FETCH_DIM_R                                      ~16     !2, 1
        20        IS_NOT_EQUAL                                     ~17     ~16, 'Countermeasures+Enabled'
        21        BOOL                                             ~15     ~17
        22    > > JMPZ                                                     ~15, ->53
  64    23    > > JMP                                                      ->45
  65    24    >   FETCH_DIM_R                                      ~18     !2, 0
        25        IS_EQUAL                                         ~19     !0, ~18
        26      > JMPZ                                                     ~19, ->29
  66    27    > > JMP                                                      ->45
        28*       JMP                                                      ->45
  69    29    >   FETCH_DIM_R                                      ~20     !2, 1
        30        ASSIGN                                                   !3, ~20
  70    31        INIT_FCALL                                               'explode'
        32        SEND_VAL                                                 '+'
        33        SEND_VAR                                                 !3
        34        DO_ICALL                                         $22     
        35        ASSIGN                                                   !4, $22
  71    36      > FE_RESET_R                                       $24     !4, ->44
        37    > > FE_FETCH_R                                               $24, !5, ->44
  72    38    >   ECHO                                                     '%3Ctr%3E'
  73    39        CONCAT                                           ~25     '%3Ctd%3E', !5
        40        CONCAT                                           ~26     ~25, '%3C%2Ftd%3E'
        41        ECHO                                                     ~26
  74    42        ECHO                                                     '%3C%2Ftr%3E'
  71    43      > JMP                                                      ->37
        44    >   FE_FREE                                                  $24
  64    45    >   INIT_FCALL                                               'fgetcsv'
        46        SEND_VAR                                                 !1
        47        SEND_VAL                                                 1000
        48        SEND_VAL                                                 '%2C'
        49        DO_ICALL                                         $27     
        50        ASSIGN                                           $28     !2, $27
        51        IS_EQUAL                                         ~29     $28, <false>
        52      > JMPNZ                                                    ~29, ->24
  62    53    >   INIT_FCALL                                               'fgetcsv'
        54        SEND_VAR                                                 !1
        55        SEND_VAL                                                 1000
        56        SEND_VAL                                                 '%2C'
        57        DO_ICALL                                         $30     
        58        ASSIGN                                           $31     !2, $30
        59        IS_EQUAL                                         ~32     $31, <false>
        60      > JMPNZ                                                    ~32, ->16
  80    61    >   INIT_FCALL                                               'fclose'
        62        SEND_VAR                                                 !1
        63        DO_ICALL                                                 
  83    64    >   ECHO                                                     '++++++++%3C%2Ftable%3E%0A++++%3C%2Fdiv%3E%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
  86    65      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.4.0