3v4l.org

run code in 300+ PHP versions simultaneously
<?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 = 50, Position 2 = 72
Branch analysis from position: 50
1 jumps found. (Code = 42) Position 1 = 65
Branch analysis from position: 65
2 jumps found. (Code = 44) Position 1 = 70, Position 2 = 53
Branch analysis from position: 70
1 jumps found. (Code = 42) Position 1 = 73
Branch analysis from position: 73
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 53
2 jumps found. (Code = 43) Position 1 = 55, Position 2 = 57
Branch analysis from position: 55
2 jumps found. (Code = 44) Position 1 = 70, Position 2 = 53
Branch analysis from position: 70
Branch analysis from position: 53
Branch analysis from position: 57
Branch analysis from position: 72
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/U0SfO
function name:  (null)
number of ops:  75
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
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'date'
          1        SEND_VAL                                                 'Y-m-j'
          2        DO_ICALL                                         $8      
          3        ASSIGN                                                   !0, $8
    4     4        INIT_FCALL                                               'strtotime'
          5        SEND_VAL                                                 '-1+day'
          6        INIT_FCALL                                               'strtotime'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $10     
          9        SEND_VAR                                                 $10
         10        DO_ICALL                                         $11     
         11        ASSIGN                                                   !1, $11
    5    12        INIT_FCALL                                               'date'
         13        SEND_VAL                                                 'Y-m-j'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $13     
         16        ASSIGN                                                   !1, $13
    6    17        INIT_FCALL                                               'strtotime'
         18        SEND_VAL                                                 '-8+day'
         19        INIT_FCALL                                               'strtotime'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $15     
         22        SEND_VAR                                                 $15
         23        DO_ICALL                                         $16     
         24        ASSIGN                                                   !2, $16
    7    25        INIT_FCALL                                               'date'
         26        SEND_VAL                                                 'Y-m-j'
         27        SEND_VAR                                                 !2
         28        DO_ICALL                                         $18     
         29        ASSIGN                                                   !2, $18
    9    30        FETCH_R                      global              ~20     '_SESSION'
         31        FETCH_DIM_R                                      ~21     ~20, 'id'
         32        CONCAT                                           ~22     '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', ~21
         33        ROPE_INIT                                     5  ~24     '%27+AND+fecha+BETWEEN++%27'
         34        ROPE_ADD                                      1  ~24     ~24, !2
         35        ROPE_ADD                                      2  ~24     ~24, '%27+AND++%27'
         36        ROPE_ADD                                      3  ~24     ~24, !1
         37        ROPE_END                                      4  ~23     ~24, '%27+GROUP+BY+fecha'
         38        CONCAT                                           ~27     ~22, ~23
         39        ASSIGN                                                   !3, ~27
   10    40        INIT_FCALL_BY_NAME                                       'mysql_query'
         41        SEND_VAR_EX                                              !3
         42        SEND_VAR_EX                                              !5
         43        DO_FCALL                                      0  $29     
         44        ASSIGN                                                   !4, $29
   12    45        INIT_FCALL_BY_NAME                                       'mysql_num_rows'
         46        SEND_VAR_EX                                              !4
         47        DO_FCALL                                      0  $31     
         48        IS_NOT_EQUAL                                             $31, 0
         49      > JMPZ                                                     ~32, ->72
   13    50    >   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    51        ASSIGN                                                   !6, 0
   19    52      > JMP                                                      ->65
   20    53    >   IS_EQUAL                                                 !6, 8
         54      > JMPZ                                                     ~34, ->57
   21    55    >   ECHO                                                     '%3C%2Ftr%3E%3Ctr%3E'
   22    56        ASSIGN                                                   !6, 0
   24    57    >   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    58        FETCH_DIM_R                                      ~36     !7, 'FECHA'
         59        ECHO                                                     ~36
         60        ECHO                                                     '%3C%2FB%3E%3C%2Ftd%3E%0A++++++++++++++++++++++++%3C%2Ftr%3E%0A++++++++++++++++++++++++%3Ctr%3E%0A++++++++++++++++++++++++++++%3Ctd+width%3D%2280%22%3E'
   31    61        FETCH_DIM_R                                      ~37     !7, 'round%28%28SUM%28%60TotalMinutos%60%29%2F60%29%2C1%29'
         62        ECHO                                                     ~37
         63        ECHO                                                     '+Horas%3C%2Ftd%3E%0A++++++++++++++++++++++%3C%2Ftr%3E%0A++++++++++++++++++++%3C%2Ftable%3E%0A%0A++++++++++++%3C%2Ftd%3E%0A++++++++++++%09%09'
   36    64        PRE_INC                                                  !6
   19    65    >   INIT_FCALL_BY_NAME                                       'mysql_fetch_array'
         66        SEND_VAR_EX                                              !4
         67        DO_FCALL                                      0  $39     
         68        ASSIGN                                           ~40     !7, $39
         69      > JMPNZ                                                    ~40, ->53
   37    70    >   ECHO                                                     '+++++++++++++%3C%2Ftr%3E%0A++++++++++++%3C%2Ftable%3E%0A++++++++++++%3Cp%3E%0A++++++++++++++'
         71      > JMP                                                      ->73
   41    72    >   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    73    >   ECHO                                                     '++++++++%3C%2Ftable%3E'
         74      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.98 ms | 1404 KiB | 17 Q