3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Marks Sheet</title> <script type="text/javascript"> function mess() { window.alert("First row must be used for Column Heading"); } </script> </head> <body onLoad="mess()"> <?php $exam=$_POST['exam']; $sub=$_POST['sub']; $col=$_POST['col']; $row=$_POST['row']; /*echo $exam; echo "<br>"; echo $sub; echo "<br>"; echo $col; echo "<br>";*/ echo "<p align='center'<b><font size='+2'>". $exam . "</font></b></p>"; echo "<p align='center'<b><font size='+1'>". $sub . "</font></b></p>"; $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("marks", $con); $result = mysql_query("SELECT * FROM vi"); while($row = mysql_fetch_array($result)) { echo $row['1']; echo "<br />"; } mysql_close($con); echo"<div align='center'"; echo "<form name='sheet' action='csheet.php' onsubmit='return check()' method='post'>"; echo"<table width='200' border='1'>"; for($a=1;$a<=$row;$a++) { echo"<tr bgcolor='#0099FF'>"; for($b=1;$b<=$col;$b++) { echo"<td><input type='text' name='' size='8' /></td>"; } echo"</tr>"; } echo"</table>"; echo "<input type='submit' value='Submit'>"; echo "</form></div>"; ?> </body> </html>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 31
Branch analysis from position: 27
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
2 jumps found. (Code = 44) Position 1 = 48, Position 2 = 40
Branch analysis from position: 48
1 jumps found. (Code = 42) Position 1 = 65
Branch analysis from position: 65
2 jumps found. (Code = 44) Position 1 = 67, Position 2 = 56
Branch analysis from position: 67
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 56
1 jumps found. (Code = 42) Position 1 = 61
Branch analysis from position: 61
2 jumps found. (Code = 44) Position 1 = 63, Position 2 = 59
Branch analysis from position: 63
2 jumps found. (Code = 44) Position 1 = 67, Position 2 = 56
Branch analysis from position: 67
Branch analysis from position: 56
Branch analysis from position: 59
2 jumps found. (Code = 44) Position 1 = 63, Position 2 = 59
Branch analysis from position: 63
Branch analysis from position: 59
Branch analysis from position: 40
2 jumps found. (Code = 44) Position 1 = 48, Position 2 = 40
Branch analysis from position: 48
Branch analysis from position: 40
filename:       /in/D74hR
function name:  (null)
number of ops:  72
compiled vars:  !0 = $exam, !1 = $sub, !2 = $col, !3 = $row, !4 = $con, !5 = $result, !6 = $a, !7 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3C%21DOCTYPE+html+PUBLIC+%22-%2F%2FW3C%2F%2FDTD+XHTML+1.0+Transitional%2F%2FEN%22+%22http%3A%2F%2Fwww.w3.org%2FTR%2Fxhtml1%2FDTD%2Fxhtml1-transitional.dtd%22%3E%0A++++%3Chtml+xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%0A++++%3Chead%3E%0A++++%3Cmeta+http-equiv%3D%22Content-Type%22+content%3D%22text%2Fhtml%3B+charset%3Diso-8859-1%22+%2F%3E%0A++++%3Ctitle%3EMarks+Sheet%3C%2Ftitle%3E%0A++++%3Cscript+type%3D%22text%2Fjavascript%22%3E%0A++++function+mess%28%29%0A++++%7B%0A++++window.alert%28%22First+row+must+be+used+for+Column+Heading%22%29%3B%0A++++%7D%0A++++%3C%2Fscript%3E%0A++++%3C%2Fhead%3E%0A++++%3Cbody+onLoad%3D%22mess%28%29%22%3E%0A++++'
   15     1        FETCH_R                      global              ~8      '_POST'
          2        FETCH_DIM_R                                      ~9      ~8, 'exam'
          3        ASSIGN                                                   !0, ~9
   16     4        FETCH_R                      global              ~11     '_POST'
          5        FETCH_DIM_R                                      ~12     ~11, 'sub'
          6        ASSIGN                                                   !1, ~12
   17     7        FETCH_R                      global              ~14     '_POST'
          8        FETCH_DIM_R                                      ~15     ~14, 'col'
          9        ASSIGN                                                   !2, ~15
   18    10        FETCH_R                      global              ~17     '_POST'
         11        FETCH_DIM_R                                      ~18     ~17, 'row'
         12        ASSIGN                                                   !3, ~18
   22    13        CONCAT                                           ~20     '%3Cp+align%3D%27center%27%3Cb%3E%3Cfont+size%3D%27%2B2%27%3E', !0
         14        CONCAT                                           ~21     ~20, '%3C%2Ffont%3E%3C%2Fb%3E%3C%2Fp%3E'
         15        ECHO                                                     ~21
   23    16        CONCAT                                           ~22     '%3Cp+align%3D%27center%27%3Cb%3E%3Cfont+size%3D%27%2B1%27%3E', !1
         17        CONCAT                                           ~23     ~22, '%3C%2Ffont%3E%3C%2Fb%3E%3C%2Fp%3E'
         18        ECHO                                                     ~23
   24    19        INIT_FCALL_BY_NAME                                       'mysql_connect'
         20        SEND_VAL_EX                                              'localhost'
         21        SEND_VAL_EX                                              'root'
         22        SEND_VAL_EX                                              ''
         23        DO_FCALL                                      0  $24     
         24        ASSIGN                                                   !4, $24
   25    25        BOOL_NOT                                         ~26     !4
         26      > JMPZ                                                     ~26, ->31
   27    27    >   INIT_FCALL_BY_NAME                                       'mysql_error'
         28        DO_FCALL                                      0  $27     
         29        CONCAT                                           ~28     'Could+not+connect%3A+', $27
         30      > EXIT                                                     ~28
   29    31    >   INIT_FCALL_BY_NAME                                       'mysql_select_db'
         32        SEND_VAL_EX                                              'marks'
         33        SEND_VAR_EX                                              !4
         34        DO_FCALL                                      0          
   30    35        INIT_FCALL_BY_NAME                                       'mysql_query'
         36        SEND_VAL_EX                                              'SELECT+%2A+FROM+vi'
         37        DO_FCALL                                      0  $30     
         38        ASSIGN                                                   !5, $30
   31    39      > JMP                                                      ->43
   33    40    >   FETCH_DIM_R                                      ~32     !3, 1
         41        ECHO                                                     ~32
   34    42        ECHO                                                     '%3Cbr+%2F%3E'
   31    43    >   INIT_FCALL_BY_NAME                                       'mysql_fetch_array'
         44        SEND_VAR_EX                                              !5
         45        DO_FCALL                                      0  $33     
         46        ASSIGN                                           ~34     !3, $33
         47      > JMPNZ                                                    ~34, ->40
   36    48    >   INIT_FCALL_BY_NAME                                       'mysql_close'
         49        SEND_VAR_EX                                              !4
         50        DO_FCALL                                      0          
   37    51        ECHO                                                     '%3Cdiv+align%3D%27center%27'
   38    52        ECHO                                                     '%3Cform+name%3D%27sheet%27+action%3D%27csheet.php%27+onsubmit%3D%27return+check%28%29%27+method%3D%27post%27%3E'
   39    53        ECHO                                                     '%3Ctable+width%3D%27200%27+border%3D%271%27%3E'
   40    54        ASSIGN                                                   !6, 1
         55      > JMP                                                      ->65
   42    56    >   ECHO                                                     '%3Ctr+bgcolor%3D%27%230099FF%27%3E'
   43    57        ASSIGN                                                   !7, 1
         58      > JMP                                                      ->61
   45    59    >   ECHO                                                     '%3Ctd%3E%3Cinput+type%3D%27text%27+name%3D%27%27+size%3D%278%27+%2F%3E%3C%2Ftd%3E'
   43    60        PRE_INC                                                  !7
         61    >   IS_SMALLER_OR_EQUAL                                      !7, !2
         62      > JMPNZ                                                    ~39, ->59
   47    63    >   ECHO                                                     '%3C%2Ftr%3E'
   40    64        PRE_INC                                                  !6
         65    >   IS_SMALLER_OR_EQUAL                                      !6, !3
         66      > JMPNZ                                                    ~41, ->56
   49    67    >   ECHO                                                     '%3C%2Ftable%3E'
   50    68        ECHO                                                     '%3Cinput+type%3D%27submit%27+value%3D%27Submit%27%3E'
   51    69        ECHO                                                     '%3C%2Fform%3E%3C%2Fdiv%3E'
   53    70        ECHO                                                     '++++%3C%2Fbody%3E%0A++++%3C%2Fhtml%3E'
   54    71      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.48 ms | 1403 KiB | 13 Q