3v4l.org

run code in 300+ PHP versions simultaneously
<?php include "conexion.php"; $fecha = date('Y-m-j'); $ayer = strtotime ( '-1 day' , strtotime ( $fecha ) ) ; $ayer = date ( 'Y-m-j' , $ayer ); $hacedias = strtotime ( '-8 day' , strtotime ( $fecha ) ) ; $hacedias = date ( 'Y-m-j' , $hacedias ); $consulta = "SELECT date_format(fecha,'%d %M') AS FECHA, round((SUM(`TotalMinutos`)/60),1) FROM reporte WHERE ingeniero ='". $_SESSION['id']."' AND fecha BETWEEN '$hacedias' AND '$ayer' GROUP BY fecha"; $rs = mysql_query($consulta,$conexion); if(mysql_num_rows($rs)!=0) { ?> <p></p> <p></p> <table border="0" cellpadding="1" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100"> <tr> <?php $i = 0; while ($reg=mysql_fetch_array($rs)){ if($i == 8){ echo "</tr><tr>"; $i = 0; } ?> <td width="100"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="150"> <tr> <td width="80"><B><?=$reg['FECHA']; ?></B></td> </tr> <tr> <td width="80"><?=$reg['round((SUM(`TotalMinutos`)/60),1)']; ?> Horas</td> </tr> </table> </td> <?php $i++; } ?> </tr> </table> <p> <?PHP } else { echo "<h3><p style='color:#FF0000'> ATENCION!!! <br> No has registrado tus tiempos en los ultimos 5 dias.</p></h3>"; } ?> </table>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 51, Position 2 = 73
Branch analysis from position: 51
1 jumps found. (Code = 42) Position 1 = 66
Branch analysis from position: 66
2 jumps found. (Code = 44) Position 1 = 71, Position 2 = 54
Branch analysis from position: 71
1 jumps found. (Code = 42) Position 1 = 74
Branch analysis from position: 74
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 54
2 jumps found. (Code = 43) Position 1 = 56, Position 2 = 58
Branch analysis from position: 56
2 jumps found. (Code = 44) Position 1 = 71, Position 2 = 54
Branch analysis from position: 71
Branch analysis from position: 54
Branch analysis from position: 58
Branch analysis from position: 73
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mT4Hs
function name:  (null)
number of ops:  76
compiled vars:  !0 = $fecha, !1 = $ayer, !2 = $hacedias, !3 = $consulta, !4 = $rs, !5 = $conexion, !6 = $i, !7 = $reg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   INCLUDE_OR_EVAL                                          'conexion.php', INCLUDE
    3     1        INIT_FCALL                                               'date'
          2        SEND_VAL                                                 'Y-m-j'
          3        DO_ICALL                                         $9      
          4        ASSIGN                                                   !0, $9
    4     5        INIT_FCALL                                               'strtotime'
          6        SEND_VAL                                                 '-1+day'
          7        INIT_FCALL                                               'strtotime'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $11     
         10        SEND_VAR                                                 $11
         11        DO_ICALL                                         $12     
         12        ASSIGN                                                   !1, $12
    5    13        INIT_FCALL                                               'date'
         14        SEND_VAL                                                 'Y-m-j'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $14     
         17        ASSIGN                                                   !1, $14
    6    18        INIT_FCALL                                               'strtotime'
         19        SEND_VAL                                                 '-8+day'
         20        INIT_FCALL                                               'strtotime'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                         $16     
         23        SEND_VAR                                                 $16
         24        DO_ICALL                                         $17     
         25        ASSIGN                                                   !2, $17
    7    26        INIT_FCALL                                               'date'
         27        SEND_VAL                                                 'Y-m-j'
         28        SEND_VAR                                                 !2
         29        DO_ICALL                                         $19     
         30        ASSIGN                                                   !2, $19
    9    31        FETCH_R                      global              ~21     '_SESSION'
         32        FETCH_DIM_R                                      ~22     ~21, 'id'
         33        CONCAT                                           ~23     'SELECT+date_format%28fecha%2C%27%25d+%25M%27%29+AS+FECHA%2C+round%28%28SUM%28%60TotalMinutos%60%29%2F60%29%2C1%29+FROM+reporte+WHERE++ingeniero+%3D%27', ~22
         34        ROPE_INIT                                     5  ~25     '%27+AND+fecha+BETWEEN++%27'
         35        ROPE_ADD                                      1  ~25     ~25, !2
         36        ROPE_ADD                                      2  ~25     ~25, '%27+AND++%27'
         37        ROPE_ADD                                      3  ~25     ~25, !1
         38        ROPE_END                                      4  ~24     ~25, '%27+GROUP+BY+fecha'
         39        CONCAT                                           ~28     ~23, ~24
         40        ASSIGN                                                   !3, ~28
   10    41        INIT_FCALL_BY_NAME                                       'mysql_query'
         42        SEND_VAR_EX                                              !3
         43        SEND_VAR_EX                                              !5
         44        DO_FCALL                                      0  $30     
         45        ASSIGN                                                   !4, $30
   12    46        INIT_FCALL_BY_NAME                                       'mysql_num_rows'
         47        SEND_VAR_EX                                              !4
         48        DO_FCALL                                      0  $32     
         49        IS_NOT_EQUAL                                             $32, 0
         50      > JMPZ                                                     ~33, ->73
   13    51    >   ECHO                                                     '++++++++%3Cp%3E%3C%2Fp%3E%0A++++++++++++%3Cp%3E%3C%2Fp%3E%0A++++++++++++%3Ctable+border%3D%220%22+cellpadding%3D%221%22+cellspacing%3D%220%22+style%3D%22border-collapse%3A+collapse%22+bordercolor%3D%22%23111111%22+width%3D%22100%22%3E%0A++++++++++++%3Ctr%3E%0A++++++++++++++++++++'
   18    52        ASSIGN                                                   !6, 0
   19    53      > JMP                                                      ->66
   20    54    >   IS_EQUAL                                                 !6, 8
         55      > JMPZ                                                     ~35, ->58
   21    56    >   ECHO                                                     '%3C%2Ftr%3E%3Ctr%3E'
   22    57        ASSIGN                                                   !6, 0
   24    58    >   ECHO                                                     '%0A++++++++++++++++%3Ctd+width%3D%22100%22%3E%0A++++++++++++++++++++%3Ctable+border%3D%220%22+cellpadding%3D%220%22+cellspacing%3D%220%22+style%3D%22border-collapse%3A+collapse%22+bordercolor%3D%22%23111111%22+width%3D%22150%22%3E%0A++++++++++++++++++++++%3Ctr%3E%0A++++++++++++++++++++++++++++%3Ctd+width%3D%2280%22%3E%3CB%3E'
   28    59        FETCH_DIM_R                                      ~37     !7, 'FECHA'
         60        ECHO                                                     ~37
         61        ECHO                                                     '%3C%2FB%3E%3C%2Ftd%3E%0A++++++++++++++++++++++++%3C%2Ftr%3E%0A++++++++++++++++++++++++%3Ctr%3E%0A++++++++++++++++++++++++++++%3Ctd+width%3D%2280%22%3E'
   31    62        FETCH_DIM_R                                      ~38     !7, 'round%28%28SUM%28%60TotalMinutos%60%29%2F60%29%2C1%29'
         63        ECHO                                                     ~38
         64        ECHO                                                     '+Horas%3C%2Ftd%3E%0A++++++++++++++++++++++%3C%2Ftr%3E%0A++++++++++++++++++++%3C%2Ftable%3E%0A%0A++++++++++++%3C%2Ftd%3E%0A++++++++++++%09%09'
   36    65        PRE_INC                                                  !6
   19    66    >   INIT_FCALL_BY_NAME                                       'mysql_fetch_array'
         67        SEND_VAR_EX                                              !4
         68        DO_FCALL                                      0  $40     
         69        ASSIGN                                           ~41     !7, $40
         70      > JMPNZ                                                    ~41, ->54
   37    71    >   ECHO                                                     '+++++++++++++%3C%2Ftr%3E%0A++++++++++++%3C%2Ftable%3E%0A++++++++++++%3Cp%3E%0A++++++++++++++'
         72      > JMP                                                      ->74
   41    73    >   ECHO                                                     '%3Ch3%3E%3Cp+style%3D%27color%3A%23FF0000%27%3E+ATENCION%21%21%21+%3Cbr%3E+No+has+registrado+tus+tiempos+en+los+ultimos+5+dias.%3C%2Fp%3E%3C%2Fh3%3E'
   43    74    >   ECHO                                                     '++++++++%3C%2Ftable%3E'
         75      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.17 ms | 1404 KiB | 17 Q