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>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.5.100.0080.00816.84
8.5.90.0060.00316.68
8.5.80.0080.00616.91
8.5.70.0050.00316.80
8.5.60.0070.01116.83
8.5.50.0090.00416.66
8.5.40.0100.00816.71
8.5.30.0050.00616.84
8.5.20.0100.00616.66
8.5.10.0090.00816.43
8.5.00.0050.00716.66
8.4.250.0050.00519.49
8.4.240.0040.00519.73
8.4.230.0060.00419.63
8.4.220.0090.00119.45
8.4.210.0050.00519.73
8.4.200.0050.00519.68
8.4.190.0060.00419.65
8.4.180.0090.00819.57
8.4.170.0060.00419.69
8.4.160.0080.00419.71
8.4.150.0080.01319.71
8.4.140.0030.00917.78
8.4.130.0050.00317.80
8.4.120.0060.01217.95
8.4.110.0070.00717.80
8.4.100.0090.01017.94
8.4.90.0090.00617.94
8.4.80.0060.00617.91
8.4.70.0140.00717.95
8.4.60.0080.00918.02
8.4.50.0050.00418.00
8.4.40.0120.00417.90
8.4.30.0040.00517.93
8.4.20.0030.01017.78
8.4.10.0050.00417.84
8.3.330.0080.00318.64
8.3.320.0060.00518.64
8.3.310.0070.00218.58
8.3.300.0090.00618.61
8.3.290.0100.00318.51
8.3.280.0100.00318.52
8.3.270.0040.00616.62
8.3.260.0090.00316.76
8.3.250.0050.00616.76
8.3.240.0050.00516.62
8.3.230.0040.00516.69
8.3.220.0100.00616.76
8.3.210.0060.00716.66
8.3.200.0110.00716.69
8.3.190.0100.00716.66
8.3.180.0050.00716.66
8.3.170.0060.00216.67
8.3.160.0060.00316.81
8.3.150.0080.00316.96
8.3.140.0080.01016.77
8.3.130.0120.00516.87
8.3.120.0100.00716.79
8.3.110.0070.00416.80
8.3.100.0100.00816.81
8.3.90.0080.00516.87
8.3.80.0100.00516.80
8.3.70.0080.00616.77
8.3.60.0130.00416.79
8.3.50.0060.00616.81
8.3.40.0050.00418.07
8.3.30.0120.00617.98
8.3.20.0070.00318.03
8.3.10.0110.00818.03
8.3.00.0100.00317.98
8.2.330.0080.00818.06
8.2.320.0110.00518.13
8.2.310.0060.00718.23

preferences:
44.59 ms | 1082 KiB | 5 Q