3v4l.org

run code in 500+ PHP versions simultaneously
<?php include 'conexion.php'; // Función para calcular Días de Ingreso y Nota automáticamente function calcularDiasYNota($fechaIngreso, $fechaInventario) { $dateIngreso = new DateTime($fechaIngreso); $dateInv = new DateTime($fechaInventario); $dias = $dateIngreso->diff($dateInv)->days; if ($dias < 15) { $nota = "Menor a 15 días"; $badgeClass = "bg-success"; // Verde } elseif ($dias <= 29) { $nota = "Entre 15 y 29 días"; $badgeClass = "bg-warning text-dark"; // Amarillo } else { $nota = "Mayor a 30 días"; $badgeClass = "bg-danger"; // Rojo } return [ 'dias' => $dias, 'nota' => $nota, 'badge' => $badgeClass ]; } // Obtener registros $sql = "SELECT * FROM inventario ORDER BY fecha_ingreso ASC"; $result = $conn->query($sql); ?> <!DOCTYPE html> <html lang="es"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Control de Inventario</title> <!-- Bootstrap 5 CSS --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"> <!-- FontAwesome Iconos --> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet"> <style> body { background-color: #f8f9fa; } .table-header { background-color: #1a252f; color: white; } .card { border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); } </style> </head> <body> <div class="container-fluid py-4 px-4"> <div class="d-flex justify-content-between align-items-center mb-4"> <h2><i class="fa-solid fa-boxes-stacked me-2"></i>Control de Inventario de Equipos</h2> <button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#modalIngreso"> <i class="fa-solid fa-plus me-1"></i> Registrar Nuevo Artículo </button> </div> <!-- Tabla de Registros --> <div class="card"> <div class="card-body p-0"> <div class="table-responsive"> <table class="table table-hover table-striped align-middle mb-0"> <thead class="table-header"> <tr> <th>FECHA INVENTARIO</th> <th>FECHA INGRESO</th> <th>SERIE</th> <th>ARTÍCULO</th> <th>ESTADO</th> <th>COMENTARIO</th> <th class="text-center">DÍAS INGRESO</th> <th class="text-center">NOTA</th> </tr> </thead> <tbody> <?php if ($result->num_rows > 0): ?> <?php while($row = $result->fetch_assoc()): $calculo = calcularDiasYNota($row['fecha_ingreso'], $row['fecha_inventario']); ?> <tr> <td><?= date("d/m/Y", strtotime($row['fecha_inventario'])) ?></td> <td><?= date("d/m/Y", strtotime($row['fecha_ingreso'])) ?></td> <td><code class="fw-bold text-dark"><?= htmlspecialchars($row['serie']) ?></code></td> <td><span class="badge bg-secondary"><?= htmlspecialchars($row['articulo']) ?></span></td> <td> <?php if($row['estado'] == 'LIMPIEZA'): ?> <span class="badge bg-info text-dark">LIMPIEZA</span> <?php else: ?> <span class="badge bg-primary">EN BODEGA</span> <?php endif; ?> </td> <td><?= htmlspecialchars($row['comentario']) ?></td> <td class="text-center fw-bold"><?= $calculo['dias'] ?></td> <td class="text-center"> <span class="badge <?= $calculo['badge'] ?> px-3 py-2"> <?= $calculo['nota'] ?> </span> </td> </tr> <?php endwhile; ?> <?php else: ?> <tr> <td colspan="8" class="text-center py-4 text-muted">No hay registros guardados.</td> </tr> <?php endif; ?> </tbody> </table> </div> </div> </div> </div> <!-- Modal Formulario de Registro --> <div class="modal fade" id="modalIngreso" tabindex="-1" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <form action="guardar.php" method="POST"> <div class="modal-header"> <h5 class="modal-title">Registrar Artículo</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <div class="mb-3"> <label class="form-label">Fecha Inventario</label> <input type="date" name="fecha_inventario" class="form-control" value="<?= date('Y-m-d') ?>" required> </div> <div class="mb-3"> <label class="form-label">Fecha Ingreso</label> <input type="date" name="fecha_ingreso" class="form-control" required> </div> <div class="mb-3"> <label class="form-label">Serie</label> <input type="text" name="serie" class="form-control" placeholder="Ej: 2700050952..." required> </div> <div class="mb-3"> <label class="form-label">Artículo</label> <select name="articulo" class="form-select" required> <option value="MPOS">MPOS</option> <option value="PAX A920PRO">PAX A920PRO</option> <option value="RAPI BAC">RAPI BAC</option> </select> </div> <div class="mb-3"> <label class="form-label">Estado</label> <select name="estado" class="form-select" required> <option value="EN BODEGA">EN BODEGA</option> <option value="LIMPIEZA">LIMPIEZA</option> <option value="REPARACION">REPARACIÓN</option> </select> </div> <div class="mb-3"> <label class="form-label">Comentario</label> <textarea name="comentario" class="form-control" rows="2" placeholder="Ej: SIN CAJA / ESTANTE ABAJO"></textarea> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancelar</button> <button type="submit" class="btn btn-success">Guardar Registro</button> </div> </form> </div> </div> </div> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script> </body> </html>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 80
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 74
Branch analysis from position: 74
2 jumps found. (Code = 44) Position 1 = 78, Position 2 = 12
Branch analysis from position: 78
1 jumps found. (Code = 42) Position 1 = 81
Branch analysis from position: 81
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 55, Position 2 = 57
Branch analysis from position: 55
1 jumps found. (Code = 42) Position 1 = 58
Branch analysis from position: 58
2 jumps found. (Code = 44) Position 1 = 78, Position 2 = 12
Branch analysis from position: 78
Branch analysis from position: 12
Branch analysis from position: 57
2 jumps found. (Code = 44) Position 1 = 78, Position 2 = 12
Branch analysis from position: 78
Branch analysis from position: 12
Branch analysis from position: 80
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PT8iU
function name:  (null)
number of ops:  88
compiled vars:  !0 = $sql, !1 = $result, !2 = $conn, !3 = $calculo, !4 = $row
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INCLUDE_OR_EVAL                                              'conexion.php', INCLUDE
   30     1        ASSIGN                                                       !0, 'SELECT+%2A+FROM+inventario+ORDER+BY+fecha_ingreso+ASC'
   31     2        INIT_METHOD_CALL                                             !2, 'query'
          3        SEND_VAR_EX                                                  !0
          4        DO_FCALL                                          0  $7      
          5        ASSIGN                                                       !1, $7
   33     6        ECHO                                                         '%0A%3C%21DOCTYPE+html%3E%0A%3Chtml+lang%3D%22es%22%3E%0A%3Chead%3E%0A++++%3Cmeta+charset%3D%22UTF-8%22%3E%0A++++%3Cmeta+name%3D%22viewport%22+content%3D%22width%3Ddevice-width%2C+initial-scale%3D1.0%22%3E%0A++++%3Ctitle%3EControl+de+Inventario%3C%2Ftitle%3E%0A++++%3C%21--+Bootstrap+5+CSS+--%3E%0A++++%3Clink+href%3D%22https%3A%2F%2Fcdn.jsdelivr.net%2Fnpm%2Fbootstrap%405.3.0%2Fdist%2Fcss%2Fbootstrap.min.css%22+rel%3D%22stylesheet%22%3E%0A++++%3C%21--+FontAwesome+Iconos+--%3E%0A++++%3Clink+href%3D%22https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Ffont-awesome%2F6.4.0%2Fcss%2Fall.min.css%22+rel%3D%22stylesheet%22%3E%0A++++%3Cstyle%3E%0A++++++++body+%7B+background-color%3A+%23f8f9fa%3B+%7D%0A++++++++.table-header+%7B+background-color%3A+%231a252f%3B+color%3A+white%3B+%7D%0A++++++++.card+%7B+border-radius%3A+12px%3B+box-shadow%3A+0+4px+6px+rgba%280%2C0%2C0%2C0.05%29%3B+%7D%0A++++%3C%2Fstyle%3E%0A%3C%2Fhead%3E%0A%3Cbody%3E%0A%0A%3Cdiv+class%3D%22container-fluid+py-4+px-4%22%3E%0A++++%3Cdiv+class%3D%22d-flex+justify-content-between+align-items-center+mb-4%22%3E%0A++++++++%3Ch2%3E%3Ci+class%3D%22fa-solid+fa-boxes-stacked+me-2%22%3E%3C%2Fi%3EControl+de+Inventario+de+Equipos%3C%2Fh2%3E%0A++++++++%3Cbutton+class%3D%22btn+btn-primary%22+data-bs-toggle%3D%22modal%22+data-bs-target%3D%22%23modalIngreso%22%3E%0A++++++++++++%3Ci+class%3D%22fa-solid+fa-plus+me-1%22%3E%3C%2Fi%3E+Registrar+Nuevo+Art%C3%ADculo%0A++++++++%3C%2Fbutton%3E%0A++++%3C%2Fdiv%3E%0A%0A++++%3C%21--+Tabla+de+Registros+--%3E%0A++++%3Cdiv+class%3D%22card%22%3E%0A++++++++%3Cdiv+class%3D%22card-body+p-0%22%3E%0A++++++++++++%3Cdiv+class%3D%22table-responsive%22%3E%0A++++++++++++++++%3Ctable+class%3D%22table+table-hover+table-striped+align-middle+mb-0%22%3E%0A++++++++++++++++++++%3Cthead+class%3D%22table-header%22%3E%0A++++++++++++++++++++++++%3Ctr%3E%0A++++++++++++++++++++++++++++%3Cth%3EFECHA+INVENTARIO%3C%2Fth%3E%0A++++++++++++++++++++++++++++%3Cth%3EFECHA+INGRESO%3C%2Fth%3E%0A++++++++++++++++++++++++++++%3Cth%3ESERIE%3C%2Fth%3E%0A++++++++++++++++++++++++++++%3Cth%3EART%C3%8DCULO%3C%2Fth%3E%0A++++++++++++++++++++++++++++%3Cth%3EESTADO%3C%2Fth%3E%0A++++++++++++++++++++++++++++%3Cth%3ECOMENTARIO%3C%2Fth%3E%0A++++++++++++++++++++++++++++%3Cth+class%3D%22text-center%22%3ED%C3%8DAS+INGRESO%3C%2Fth%3E%0A++++++++++++++++++++++++++++%3Cth+class%3D%22text-center%22%3ENOTA%3C%2Fth%3E%0A++++++++++++++++++++++++%3C%2Ftr%3E%0A++++++++++++++++++++%3C%2Fthead%3E%0A++++++++++++++++++++%3Ctbody%3E%0A++++++++++++++++++++++++'
   78     7        FETCH_OBJ_R                                          ~9      !1, 'num_rows'
          8        IS_SMALLER                                                   0, ~9
          9      > JMPZ                                                         ~10, ->80
   79    10    >   ECHO                                                         '++++++++++++++++++++++++++++'
         11      > JMP                                                          ->74
   80    12    >   INIT_FCALL                                                   'calculardiasynota'
         13        FETCH_DIM_R                                          ~11     !4, 'fecha_ingreso'
         14        SEND_VAL                                                     ~11
         15        FETCH_DIM_R                                          ~12     !4, 'fecha_inventario'
         16        SEND_VAL                                                     ~12
         17        DO_FCALL                                          0  $13     
         18        ASSIGN                                                       !3, $13
   82    19        ECHO                                                         '++++++++++++++++++++++++++++++++%3Ctr%3E%0A++++++++++++++++++++++++++++++++++++%3Ctd%3E'
   83    20        INIT_FCALL                                                   'date'
         21        SEND_VAL                                                     'd%2Fm%2FY'
         22        INIT_FCALL                                                   'strtotime'
         23        FETCH_DIM_R                                          ~15     !4, 'fecha_inventario'
         24        SEND_VAL                                                     ~15
         25        DO_ICALL                                             $16     
         26        SEND_VAR                                                     $16
         27        DO_ICALL                                             $17     
         28        ECHO                                                         $17
         29        ECHO                                                         '%3C%2Ftd%3E%0A++++++++++++++++++++++++++++++++++++%3Ctd%3E'
   84    30        INIT_FCALL                                                   'date'
         31        SEND_VAL                                                     'd%2Fm%2FY'
         32        INIT_FCALL                                                   'strtotime'
         33        FETCH_DIM_R                                          ~18     !4, 'fecha_ingreso'
         34        SEND_VAL                                                     ~18
         35        DO_ICALL                                             $19     
         36        SEND_VAR                                                     $19
         37        DO_ICALL                                             $20     
         38        ECHO                                                         $20
         39        ECHO                                                         '%3C%2Ftd%3E%0A++++++++++++++++++++++++++++++++++++%3Ctd%3E%3Ccode+class%3D%22fw-bold+text-dark%22%3E'
   85    40        INIT_FCALL                                                   'htmlspecialchars'
         41        FETCH_DIM_R                                          ~21     !4, 'serie'
         42        SEND_VAL                                                     ~21
         43        DO_ICALL                                             $22     
         44        ECHO                                                         $22
         45        ECHO                                                         '%3C%2Fcode%3E%3C%2Ftd%3E%0A++++++++++++++++++++++++++++++++++++%3Ctd%3E%3Cspan+class%3D%22badge+bg-secondary%22%3E'
   86    46        INIT_FCALL                                                   'htmlspecialchars'
         47        FETCH_DIM_R                                          ~23     !4, 'articulo'
         48        SEND_VAL                                                     ~23
         49        DO_ICALL                                             $24     
         50        ECHO                                                         $24
         51        ECHO                                                         '%3C%2Fspan%3E%3C%2Ftd%3E%0A++++++++++++++++++++++++++++++++++++%3Ctd%3E%0A++++++++++++++++++++++++++++++++++++++++'
   88    52        FETCH_DIM_R                                          ~25     !4, 'estado'
         53        IS_EQUAL                                                     ~25, 'LIMPIEZA'
         54      > JMPZ                                                         ~26, ->57
   89    55    >   ECHO                                                         '++++++++++++++++++++++++++++++++++++++++++++%3Cspan+class%3D%22badge+bg-info+text-dark%22%3ELIMPIEZA%3C%2Fspan%3E%0A++++++++++++++++++++++++++++++++++++++++'
   88    56      > JMP                                                          ->58
   91    57    >   ECHO                                                         '++++++++++++++++++++++++++++++++++++++++++++%3Cspan+class%3D%22badge+bg-primary%22%3EEN+BODEGA%3C%2Fspan%3E%0A++++++++++++++++++++++++++++++++++++++++'
   93    58    >   ECHO                                                         '++++++++++++++++++++++++++++++++++++%3C%2Ftd%3E%0A++++++++++++++++++++++++++++++++++++%3Ctd%3E'
   94    59        INIT_FCALL                                                   'htmlspecialchars'
         60        FETCH_DIM_R                                          ~27     !4, 'comentario'
         61        SEND_VAL                                                     ~27
         62        DO_ICALL                                             $28     
         63        ECHO                                                         $28
         64        ECHO                                                         '%3C%2Ftd%3E%0A++++++++++++++++++++++++++++++++++++%3Ctd+class%3D%22text-center+fw-bold%22%3E'
   95    65        FETCH_DIM_R                                          ~29     !3, 'dias'
         66        ECHO                                                         ~29
         67        ECHO                                                         '%3C%2Ftd%3E%0A++++++++++++++++++++++++++++++++++++%3Ctd+class%3D%22text-center%22%3E%0A++++++++++++++++++++++++++++++++++++++++%3Cspan+class%3D%22badge+'
   97    68        FETCH_DIM_R                                          ~30     !3, 'badge'
         69        ECHO                                                         ~30
         70        ECHO                                                         '+px-3+py-2%22%3E%0A++++++++++++++++++++++++++++++++++++++++++++'
   98    71        FETCH_DIM_R                                          ~31     !3, 'nota'
         72        ECHO                                                         ~31
   99    73        ECHO                                                         '++++++++++++++++++++++++++++++++++++++++%3C%2Fspan%3E%0A++++++++++++++++++++++++++++++++++++%3C%2Ftd%3E%0A++++++++++++++++++++++++++++++++%3C%2Ftr%3E%0A++++++++++++++++++++++++++++'
   79    74    >   INIT_METHOD_CALL                                             !1, 'fetch_assoc'
         75        DO_FCALL                                          0  $32     
         76        ASSIGN                                               ~33     !4, $32
         77      > JMPNZ                                                        ~33, ->12
  103    78    >   ECHO                                                         '++++++++++++++++++++++++'
   78    79      > JMP                                                          ->81
  104    80    >   ECHO                                                         '++++++++++++++++++++++++++++%3Ctr%3E%0A++++++++++++++++++++++++++++++++%3Ctd+colspan%3D%228%22+class%3D%22text-center+py-4+text-muted%22%3ENo+hay+registros+guardados.%3C%2Ftd%3E%0A++++++++++++++++++++++++++++%3C%2Ftr%3E%0A++++++++++++++++++++++++'
  108    81    >   ECHO                                                         '++++++++++++++++++++%3C%2Ftbody%3E%0A++++++++++++++++%3C%2Ftable%3E%0A++++++++++++%3C%2Fdiv%3E%0A++++++++%3C%2Fdiv%3E%0A++++%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A%0A%3C%21--+Modal+Formulario+de+Registro+--%3E%0A%3Cdiv+class%3D%22modal+fade%22+id%3D%22modalIngreso%22+tabindex%3D%22-1%22+aria-hidden%3D%22true%22%3E%0A++++%3Cdiv+class%3D%22modal-dialog%22%3E%0A++++++++%3Cdiv+class%3D%22modal-content%22%3E%0A++++++++++++%3Cform+action%3D%22guardar.php%22+method%3D%22POST%22%3E%0A++++++++++++++++%3Cdiv+class%3D%22modal-header%22%3E%0A++++++++++++++++++++%3Ch5+class%3D%22modal-title%22%3ERegistrar+Art%C3%ADculo%3C%2Fh5%3E%0A++++++++++++++++++++%3Cbutton+type%3D%22button%22+class%3D%22btn-close%22+data-bs-dismiss%3D%22modal%22+aria-label%3D%22Close%22%3E%3C%2Fbutton%3E%0A++++++++++++++++%3C%2Fdiv%3E%0A++++++++++++++++%3Cdiv+class%3D%22modal-body%22%3E%0A++++++++++++++++++++%3Cdiv+class%3D%22mb-3%22%3E%0A++++++++++++++++++++++++%3Clabel+class%3D%22form-label%22%3EFecha+Inventario%3C%2Flabel%3E%0A++++++++++++++++++++++++%3Cinput+type%3D%22date%22+name%3D%22fecha_inventario%22+class%3D%22form-control%22+value%3D%22'
  127    82        INIT_FCALL                                                   'date'
         83        SEND_VAL                                                     'Y-m-d'
         84        DO_ICALL                                             $34     
         85        ECHO                                                         $34
         86        ECHO                                                         '%22+required%3E%0A++++++++++++++++++++%3C%2Fdiv%3E%0A++++++++++++++++++++%3Cdiv+class%3D%22mb-3%22%3E%0A++++++++++++++++++++++++%3Clabel+class%3D%22form-label%22%3EFecha+Ingreso%3C%2Flabel%3E%0A++++++++++++++++++++++++%3Cinput+type%3D%22date%22+name%3D%22fecha_ingreso%22+class%3D%22form-control%22+required%3E%0A++++++++++++++++++++%3C%2Fdiv%3E%0A++++++++++++++++++++%3Cdiv+class%3D%22mb-3%22%3E%0A++++++++++++++++++++++++%3Clabel+class%3D%22form-label%22%3ESerie%3C%2Flabel%3E%0A++++++++++++++++++++++++%3Cinput+type%3D%22text%22+name%3D%22serie%22+class%3D%22form-control%22+placeholder%3D%22Ej%3A+2700050952...%22+required%3E%0A++++++++++++++++++++%3C%2Fdiv%3E%0A++++++++++++++++++++%3Cdiv+class%3D%22mb-3%22%3E%0A++++++++++++++++++++++++%3Clabel+class%3D%22form-label%22%3EArt%C3%ADculo%3C%2Flabel%3E%0A++++++++++++++++++++++++%3Cselect+name%3D%22articulo%22+class%3D%22form-select%22+required%3E%0A++++++++++++++++++++++++++++%3Coption+value%3D%22MPOS%22%3EMPOS%3C%2Foption%3E%0A++++++++++++++++++++++++++++%3Coption+value%3D%22PAX+A920PRO%22%3EPAX+A920PRO%3C%2Foption%3E%0A++++++++++++++++++++++++++++%3Coption+value%3D%22RAPI+BAC%22%3ERAPI+BAC%3C%2Foption%3E%0A++++++++++++++++++++++++%3C%2Fselect%3E%0A++++++++++++++++++++%3C%2Fdiv%3E%0A++++++++++++++++++++%3Cdiv+class%3D%22mb-3%22%3E%0A++++++++++++++++++++++++%3Clabel+class%3D%22form-label%22%3EEstado%3C%2Flabel%3E%0A++++++++++++++++++++++++%3Cselect+name%3D%22estado%22+class%3D%22form-select%22+required%3E%0A++++++++++++++++++++++++++++%3Coption+value%3D%22EN+BODEGA%22%3EEN+BODEGA%3C%2Foption%3E%0A++++++++++++++++++++++++++++%3Coption+value%3D%22LIMPIEZA%22%3ELIMPIEZA%3C%2Foption%3E%0A++++++++++++++++++++++++++++%3Coption+value%3D%22REPARACION%22%3EREPARACI%C3%93N%3C%2Foption%3E%0A++++++++++++++++++++++++%3C%2Fselect%3E%0A++++++++++++++++++++%3C%2Fdiv%3E%0A++++++++++++++++++++%3Cdiv+class%3D%22mb-3%22%3E%0A++++++++++++++++++++++++%3Clabel+class%3D%22form-label%22%3EComentario%3C%2Flabel%3E%0A++++++++++++++++++++++++%3Ctextarea+name%3D%22comentario%22+class%3D%22form-control%22+rows%3D%222%22+placeholder%3D%22Ej%3A+SIN+CAJA+%2F+ESTANTE+ABAJO%22%3E%3C%2Ftextarea%3E%0A++++++++++++++++++++%3C%2Fdiv%3E%0A++++++++++++++++%3C%2Fdiv%3E%0A++++++++++++++++%3Cdiv+class%3D%22modal-footer%22%3E%0A++++++++++++++++++++%3Cbutton+type%3D%22button%22+class%3D%22btn+btn-secondary%22+data-bs-dismiss%3D%22modal%22%3ECancelar%3C%2Fbutton%3E%0A++++++++++++++++++++%3Cbutton+type%3D%22submit%22+class%3D%22btn+btn-success%22%3EGuardar+Registro%3C%2Fbutton%3E%0A++++++++++++++++%3C%2Fdiv%3E%0A++++++++++++%3C%2Fform%3E%0A++++++++%3C%2Fdiv%3E%0A++++%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A%0A%3Cscript+src%3D%22https%3A%2F%2Fcdn.jsdelivr.net%2Fnpm%2Fbootstrap%405.3.0%2Fdist%2Fjs%2Fbootstrap.bundle.min.js%22%3E%3C%2Fscript%3E%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
  169    87      > RETURN                                                       1

Function calculardiasynota:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 20
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 25
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PT8iU
function name:  calcularDiasYNota
number of ops:  32
compiled vars:  !0 = $fechaIngreso, !1 = $fechaInventario, !2 = $dateIngreso, !3 = $dateInv, !4 = $dias, !5 = $nota, !6 = $badgeClass
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    7     2        NEW                                                  $7      'DateTime'
          3        SEND_VAR_EX                                                  !0
          4        DO_FCALL                                          0          
          5        ASSIGN                                                       !2, $7
    8     6        NEW                                                  $10     'DateTime'
          7        SEND_VAR_EX                                                  !1
          8        DO_FCALL                                          0          
          9        ASSIGN                                                       !3, $10
    9    10        INIT_METHOD_CALL                                             !2, 'diff'
         11        SEND_VAR_EX                                                  !3
         12        DO_FCALL                                          0  $13     
         13        FETCH_OBJ_R                                          ~14     $13, 'days'
         14        ASSIGN                                                       !4, ~14
   11    15        IS_SMALLER                                                   !4, 15
         16      > JMPZ                                                         ~16, ->20
   12    17    >   ASSIGN                                                       !5, 'Menor+a+15+d%C3%ADas'
   13    18        ASSIGN                                                       !6, 'bg-success'
   11    19      > JMP                                                          ->27
   14    20    >   IS_SMALLER_OR_EQUAL                                          !4, 29
         21      > JMPZ                                                         ~19, ->25
   15    22    >   ASSIGN                                                       !5, 'Entre+15+y+29+d%C3%ADas'
   16    23        ASSIGN                                                       !6, 'bg-warning+text-dark'
   14    24      > JMP                                                          ->27
   18    25    >   ASSIGN                                                       !5, 'Mayor+a+30+d%C3%ADas'
   19    26        ASSIGN                                                       !6, 'bg-danger'
   23    27    >   INIT_ARRAY                                           ~24     !4, 'dias'
   24    28        ADD_ARRAY_ELEMENT                                    ~24     !5, 'nota'
   25    29        ADD_ARRAY_ELEMENT                                    ~24     !6, 'badge'
         30      > RETURN                                                       ~24
   27    31*     > RETURN                                                       null

End of function calculardiasynota

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
155.97 ms | 860 KiB | 12 Q