3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "<table cellpadding = 10>"; echo '<tr>'; echo '<th>3D table</th>'; $c = 0; if ($c >= $cols) { echo '</tr>'; $c = 0; } $start = '2014-04-01'; $end = '2014-04-31'; //for ($x=0;$x<count($values);$x++) { $sql = "SELECT empName, date, timeIn FROM attendance WHERE date >= '$start' AND date <= '$end' GROUP BY empName ORDER BY empName ASC"; $searchQuery = mysql_query("SELECT date FROM attendance GROUP BY DAY(date) ORDER BY date DESC LIMIT 20") or die($searchQuery."<br/><br/>".mysql_error()); $nums = mysql_num_rows($searchQuery); $rQuery = mysql_query($sql) or die($rQuery . "<br/><br/>" . mysql_error()); $num = mysql_num_rows($rQuery); for($y = 0; $y < $num; $y++) { $row = mysql_fetch_array($rQuery); echo '<tr>'; echo '<td class="odd">'. $row['empName'] .'</td>'; for($i = 0; $i < $nums; $i++) { $rows = mysql_fetch_array($searchQuery); echo '<td class="even">'.$rows['date'].'</td>'; }echo $y; echo '</tr>'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
2 jumps found. (Code = 47) Position 1 = 21, Position 2 = 27
Branch analysis from position: 21
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 27
2 jumps found. (Code = 47) Position 1 = 36, Position 2 = 42
Branch analysis from position: 36
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 42
1 jumps found. (Code = 42) Position 1 = 73
Branch analysis from position: 73
2 jumps found. (Code = 44) Position 1 = 75, Position 2 = 48
Branch analysis from position: 75
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 48
1 jumps found. (Code = 42) Position 1 = 68
Branch analysis from position: 68
2 jumps found. (Code = 44) Position 1 = 70, Position 2 = 59
Branch analysis from position: 70
2 jumps found. (Code = 44) Position 1 = 75, Position 2 = 48
Branch analysis from position: 75
Branch analysis from position: 48
Branch analysis from position: 59
2 jumps found. (Code = 44) Position 1 = 70, Position 2 = 59
Branch analysis from position: 70
Branch analysis from position: 59
Branch analysis from position: 8
filename:       /in/9XYfY
function name:  (null)
number of ops:  76
compiled vars:  !0 = $c, !1 = $cols, !2 = $start, !3 = $end, !4 = $sql, !5 = $searchQuery, !6 = $nums, !7 = $rQuery, !8 = $num, !9 = $y, !10 = $row, !11 = $i, !12 = $rows
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ECHO                                                     '%3Ctable+cellpadding+%3D+10%3E'
    4     1        ECHO                                                     '%3Ctr%3E'
    5     2        ECHO                                                     '%3Cth%3E3D+table%3C%2Fth%3E'
    6     3        ASSIGN                                                   !0, 0
    7     4        IS_SMALLER_OR_EQUAL                                      !1, !0
          5      > JMPZ                                                     ~14, ->8
          6    >   ECHO                                                     '%3C%2Ftr%3E'
          7        ASSIGN                                                   !0, 0
    9     8    >   ASSIGN                                                   !2, '2014-04-01'
   10     9        ASSIGN                                                   !3, '2014-04-31'
   12    10        ROPE_INIT                                     5  ~19     'SELECT+empName%2C+date%2C+timeIn%0AFROM+attendance+WHERE+date+%3E%3D+%27'
   13    11        ROPE_ADD                                      1  ~19     ~19, !2
         12        ROPE_ADD                                      2  ~19     ~19, '%27+AND%0Adate+%3C%3D+%27'
   14    13        ROPE_ADD                                      3  ~19     ~19, !3
         14        ROPE_END                                      4  ~18     ~19, '%27+%0AGROUP+BY+empName+ORDER+BY+empName+ASC'
   12    15        ASSIGN                                                   !4, ~18
   16    16        INIT_FCALL_BY_NAME                                       'mysql_query'
         17        SEND_VAL_EX                                              'SELECT+date+FROM+attendance+GROUP+BY+DAY%28date%29+ORDER+BY+date+DESC+LIMIT+20'
         18        DO_FCALL                                      0  $23     
         19        ASSIGN                                           ~24     !5, $23
         20      > JMPNZ_EX                                         ~24     ~24, ->27
   17    21    >   CONCAT                                           ~25     !5, '%3Cbr%2F%3E%3Cbr%2F%3E'
         22        INIT_FCALL_BY_NAME                                       'mysql_error'
         23        DO_FCALL                                      0  $26     
         24        CONCAT                                           ~27     ~25, $26
         25      > EXIT                                                     ~27
         26*       BOOL                                             ~24     <true>
   18    27    >   INIT_FCALL_BY_NAME                                       'mysql_num_rows'
         28        SEND_VAR_EX                                              !5
         29        DO_FCALL                                      0  $28     
         30        ASSIGN                                                   !6, $28
   19    31        INIT_FCALL_BY_NAME                                       'mysql_query'
         32        SEND_VAR_EX                                              !4
         33        DO_FCALL                                      0  $30     
         34        ASSIGN                                           ~31     !7, $30
         35      > JMPNZ_EX                                         ~31     ~31, ->42
         36    >   CONCAT                                           ~32     !7, '%3Cbr%2F%3E%3Cbr%2F%3E'
         37        INIT_FCALL_BY_NAME                                       'mysql_error'
         38        DO_FCALL                                      0  $33     
         39        CONCAT                                           ~34     ~32, $33
         40      > EXIT                                                     ~34
         41*       BOOL                                             ~31     <true>
   20    42    >   INIT_FCALL_BY_NAME                                       'mysql_num_rows'
         43        SEND_VAR_EX                                              !7
         44        DO_FCALL                                      0  $35     
         45        ASSIGN                                                   !8, $35
   22    46        ASSIGN                                                   !9, 0
         47      > JMP                                                      ->73
   23    48    >   INIT_FCALL_BY_NAME                                       'mysql_fetch_array'
         49        SEND_VAR_EX                                              !7
         50        DO_FCALL                                      0  $38     
         51        ASSIGN                                                   !10, $38
   24    52        ECHO                                                     '%3Ctr%3E'
   25    53        FETCH_DIM_R                                      ~40     !10, 'empName'
         54        CONCAT                                           ~41     '%3Ctd+class%3D%22odd%22%3E', ~40
         55        CONCAT                                           ~42     ~41, '%3C%2Ftd%3E'
         56        ECHO                                                     ~42
   26    57        ASSIGN                                                   !11, 0
         58      > JMP                                                      ->68
   27    59    >   INIT_FCALL_BY_NAME                                       'mysql_fetch_array'
         60        SEND_VAR_EX                                              !5
         61        DO_FCALL                                      0  $44     
         62        ASSIGN                                                   !12, $44
   28    63        FETCH_DIM_R                                      ~46     !12, 'date'
         64        CONCAT                                           ~47     '%3Ctd+class%3D%22even%22%3E', ~46
         65        CONCAT                                           ~48     ~47, '%3C%2Ftd%3E'
         66        ECHO                                                     ~48
   26    67        PRE_INC                                                  !11
         68    >   IS_SMALLER                                               !11, !6
         69      > JMPNZ                                                    ~50, ->59
   30    70    >   ECHO                                                     !9
   31    71        ECHO                                                     '%3C%2Ftr%3E'
   22    72        PRE_INC                                                  !9
         73    >   IS_SMALLER                                               !9, !8
         74      > JMPNZ                                                    ~52, ->48
   32    75    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.6 ms | 1403 KiB | 13 Q