3v4l.org

run code in 500+ PHP versions simultaneously
<?php // Etapa 1: Estrutura de Dados - array multidimensional associativo $usuarios = [ [ 'id' => 1, 'nome' => 'Ana Souza', 'email' => 'ana.souza@email.com', 'perfil' => 'Administrador' ], [ 'id' => 2, 'nome' => 'Bruno Lima', 'email' => 'bruno.lima@email.com', 'perfil' => 'Editor' ], [ 'id' => 3, 'nome' => 'Carla Mendes', 'email' => 'carla.mendes@email.com', 'perfil' => 'Visitante' ], [ 'id' => 4, 'nome' => 'Diego Alves', 'email' => 'diego.alves@email.com', 'perfil' => 'Editor' ], ]; ?> <!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="UTF-8"> <title>Tabela de Usuários</title> <style> body { font-family: Arial, sans-serif; background-color: #f4f4f4; padding: 20px; } table { width: 100%; border-collapse: collapse; background-color: #fff; box-shadow: 0 0 5px rgba(0,0,0,0.1); } thead { background-color: #333; color: #fff; } th, td { border: 1px solid #ddd; padding: 10px 14px; text-align: left; } tbody tr:nth-child(even) { background-color: #f9f9f9; } tbody tr:hover { background-color: #f1f1f1; } .btn-editar, .btn-excluir { display: inline-block; padding: 5px 10px; margin-right: 5px; border-radius: 4px; text-decoration: none; color: #fff; font-size: 13px; } .btn-editar { background-color: #2b8a3e; } .btn-editar:hover { background-color: #237030; } .btn-excluir { background-color: #c92a2a; } .btn-excluir:hover { background-color: #a61e1e; } </style> </head> <body> <h1>Lista de Usuários</h1> <table> <thead> <tr> <th>ID</th> <th>Nome</th> <th>E-mail</th> <th>Perfil</th> <th>Ações</th> </tr> </thead> <tbody> <?php foreach ($usuarios as $user): ?> <tr> <td><?= $user['id'] ?></td> <td><?= $user['nome'] ?></td> <td><?= $user['email'] ?></td> <td><?= $user['perfil'] ?></td> <td> <a class="btn-editar" href="form_usuario.php?id=<?= $user['id'] ?>">Editar</a> <a class="btn-excluir" href="excluir_usuario.php?id=<?= $user['id'] ?>">Excluir</a> </td> </tr> <?php endforeach; ?> </tbody> </table> </body> </html>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 24
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 24
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/rpYd3
function name:  (null)
number of ops:  27
compiled vars:  !0 = $usuarios, !1 = $user
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   30     1        ECHO                                                         '%3C%21DOCTYPE+html%3E%0A%3Chtml+lang%3D%22pt-br%22%3E%0A%3Chead%3E%0A++++%3Cmeta+charset%3D%22UTF-8%22%3E%0A++++%3Ctitle%3ETabela+de+Usu%C3%A1rios%3C%2Ftitle%3E%0A++++%3Cstyle%3E%0A++++++++body+%7B%0A++++++++++++font-family%3A+Arial%2C+sans-serif%3B%0A++++++++++++background-color%3A+%23f4f4f4%3B%0A++++++++++++padding%3A+20px%3B%0A++++++++%7D%0A++++++++table+%7B%0A++++++++++++width%3A+100%25%3B%0A++++++++++++border-collapse%3A+collapse%3B%0A++++++++++++background-color%3A+%23fff%3B%0A++++++++++++box-shadow%3A+0+0+5px+rgba%280%2C0%2C0%2C0.1%29%3B%0A++++++++%7D%0A++++++++thead+%7B%0A++++++++++++background-color%3A+%23333%3B%0A++++++++++++color%3A+%23fff%3B%0A++++++++%7D%0A++++++++th%2C+td+%7B%0A++++++++++++border%3A+1px+solid+%23ddd%3B%0A++++++++++++padding%3A+10px+14px%3B%0A++++++++++++text-align%3A+left%3B%0A++++++++%7D%0A++++++++tbody+tr%3Anth-child%28even%29+%7B%0A++++++++++++background-color%3A+%23f9f9f9%3B%0A++++++++%7D%0A++++++++tbody+tr%3Ahover+%7B%0A++++++++++++background-color%3A+%23f1f1f1%3B%0A++++++++%7D%0A++++++++.btn-editar%2C+.btn-excluir+%7B%0A++++++++++++display%3A+inline-block%3B%0A++++++++++++padding%3A+5px+10px%3B%0A++++++++++++margin-right%3A+5px%3B%0A++++++++++++border-radius%3A+4px%3B%0A++++++++++++text-decoration%3A+none%3B%0A++++++++++++color%3A+%23fff%3B%0A++++++++++++font-size%3A+13px%3B%0A++++++++%7D%0A++++++++.btn-editar+%7B%0A++++++++++++background-color%3A+%232b8a3e%3B%0A++++++++%7D%0A++++++++.btn-editar%3Ahover+%7B%0A++++++++++++background-color%3A+%23237030%3B%0A++++++++%7D%0A++++++++.btn-excluir+%7B%0A++++++++++++background-color%3A+%23c92a2a%3B%0A++++++++%7D%0A++++++++.btn-excluir%3Ahover+%7B%0A++++++++++++background-color%3A+%23a61e1e%3B%0A++++++++%7D%0A++++%3C%2Fstyle%3E%0A%3C%2Fhead%3E%0A%3Cbody%3E%0A+%0A++++%3Ch1%3ELista+de+Usu%C3%A1rios%3C%2Fh1%3E%0A+%0A++++%3Ctable%3E%0A++++++++%3Cthead%3E%0A++++++++++++%3Ctr%3E%0A++++++++++++++++%3Cth%3EID%3C%2Fth%3E%0A++++++++++++++++%3Cth%3ENome%3C%2Fth%3E%0A++++++++++++++++%3Cth%3EE-mail%3C%2Fth%3E%0A++++++++++++++++%3Cth%3EPerfil%3C%2Fth%3E%0A++++++++++++++++%3Cth%3EA%C3%A7%C3%B5es%3C%2Fth%3E%0A++++++++++++%3C%2Ftr%3E%0A++++++++%3C%2Fthead%3E%0A++++++++%3Ctbody%3E%0A++++++++++++'
  100     2      > FE_RESET_R                                           $3      !0, ->24
          3    > > FE_FETCH_R                                                   $3, !1, ->24
  101     4    >   ECHO                                                         '++++++++++++%3Ctr%3E%0A++++++++++++++++%3Ctd%3E'
  102     5        FETCH_DIM_R                                          ~4      !1, 'id'
          6        ECHO                                                         ~4
          7        ECHO                                                         '%3C%2Ftd%3E%0A++++++++++++++++%3Ctd%3E'
  103     8        FETCH_DIM_R                                          ~5      !1, 'nome'
          9        ECHO                                                         ~5
         10        ECHO                                                         '%3C%2Ftd%3E%0A++++++++++++++++%3Ctd%3E'
  104    11        FETCH_DIM_R                                          ~6      !1, 'email'
         12        ECHO                                                         ~6
         13        ECHO                                                         '%3C%2Ftd%3E%0A++++++++++++++++%3Ctd%3E'
  105    14        FETCH_DIM_R                                          ~7      !1, 'perfil'
         15        ECHO                                                         ~7
         16        ECHO                                                         '%3C%2Ftd%3E%0A++++++++++++++++%3Ctd%3E%0A++++++++++++++++++++%3Ca+class%3D%22btn-editar%22+href%3D%22form_usuario.php%3Fid%3D'
  107    17        FETCH_DIM_R                                          ~8      !1, 'id'
         18        ECHO                                                         ~8
         19        ECHO                                                         '%22%3EEditar%3C%2Fa%3E%0A++++++++++++++++++++%3Ca+class%3D%22btn-excluir%22+href%3D%22excluir_usuario.php%3Fid%3D'
  108    20        FETCH_DIM_R                                          ~9      !1, 'id'
         21        ECHO                                                         ~9
         22        ECHO                                                         '%22%3EExcluir%3C%2Fa%3E%0A++++++++++++++++%3C%2Ftd%3E%0A++++++++++++%3C%2Ftr%3E%0A++++++++++++'
  100    23      > JMP                                                          ->3
         24    >   FE_FREE                                                      $3
  112    25        ECHO                                                         '++++++++%3C%2Ftbody%3E%0A++++%3C%2Ftable%3E%0A+%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
  116    26      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
149.61 ms | 1089 KiB | 8 Q