3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Ler dados enviados pelo formulario gerado if(isset($_POST["enviar"])){ foreach($_POST["checkbox"] as $key=>$value){ // echo "ID: " . $id . " Nome: " . $_POST["nome"][$id] . "<br/>"; echo $id_saida = mysql_real_escape_string($value); $tipo = mysql_real_escape_string($_POST['tipo_serv'][$key]); echo $nome = mysql_real_escape_string($_POST['nome'][$key]); $start = mysql_real_escape_string($_POST['start'][$key]); echo $valor = mysql_real_escape_string($_POST['valor'][$key]); $desconto = mysql_real_escape_string($_POST['desconto'][$key]); $tipo_veiculo = mysql_real_escape_string($_POST['tipo_veiculo'][$key]); } } // Conexao $mysqli = new mysqli("localhost", "root", "", "example"); ################### $id_transfer = ""; ################### $sql = "SELECT * FROM produtos where id_transfer = '$id_transfer' AND tipo_serv <> 'Regular'"; $form = null; if($query = mysqli_query($mysqli, $sql)){ $form .= "<table>"; while($linha = mysqli_fetch_object($query)){ // $form .= "({$linha->id}) <input type=\"checkbox\" name=\"checkbox[{$linha->id}]\" value=\"{$linha->id}\"/>{$linha->nome}<br/>"; // $form .= "<input type=\"hidden\" name=\"nome[{$linha->id}]\" value=\"{$linha->nome}\"/>"; ################################################################################################################################## $id_produtos = $linha['id_produtos']; $nome = $linha['nome']; $valor = $linha['valor']; $tipo_serv = $linha['tipo_serv']; $form .= "<td><input name=\"checkbox[{$id_produtos}]\" type=\"checkbox\" value=\"{$id_produtos}\"/></td>"; $form .= "<td>{$id_produtos}</td>"; $form .= "<td><input type=\"hidden\" name=\"nome[{$id_produtos}]\" value=\"{$nome}\" /></td>"; $form .= "<td><input type=\"hidden\" name=\"tipo_serv[{$id_produtos}]\" value=\"{$tipo_serv}\" /></td>"; $form .= "<td><input type=\"hidden\" name=\"valor[{$id_produtos}]\"value=\"{$valor}\" /></td>"; } $form .= "</table>"; // Montar o resto do formulário ?> <hr> <form method="POST" action=""> <!-- Resto !--> <?php echo $form; ?> <!-- Resto !--> <input type="submit" name="enviar" value="enviar"/> </form> <?php } ?>

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.1rc20.0000.00816.87
8.1rc10.0080.00016.96
8.0.100.0080.00016.96
8.0.90.0000.00717.06
8.0.80.0090.00616.94
8.0.70.0000.00816.86
8.0.60.0040.00416.87
8.0.50.0040.00416.85
8.0.30.0110.00917.05
8.0.20.0090.01217.40
8.0.10.0040.00416.96
8.0.00.0080.01216.85
7.4.230.0000.00816.45
7.4.220.0120.00616.47
7.4.210.0040.01116.52
7.4.200.0030.00316.37
7.4.160.0070.01016.71
7.4.150.0070.01017.40
7.4.140.0130.00917.86
7.4.130.0090.01116.48
7.4.120.0090.01116.44
7.4.110.0110.00616.69
7.4.100.0150.00616.56
7.4.90.0110.00616.63
7.4.80.0100.00719.39
7.4.70.0130.00316.60
7.4.60.0080.00816.36
7.4.50.0030.00616.68
7.4.40.0100.00616.65
7.4.30.0140.00316.58
7.4.00.0120.00315.15
7.3.300.0050.00316.37
7.3.290.0070.00716.35
7.3.280.0090.00916.39
7.3.270.0140.00317.40
7.3.260.0210.00316.40
7.3.250.0090.00816.52
7.3.240.0130.00616.64
7.3.230.0080.00916.39
7.3.210.0120.00316.44
7.3.200.0230.00416.53
7.3.190.0030.01316.43
7.3.180.0090.01216.47
7.3.170.0110.00616.56
7.3.160.0120.00416.40
7.3.00.0070.00416.62
7.2.330.0130.00316.51
7.2.320.0110.01916.76
7.2.310.0060.01016.66
7.2.300.0070.01016.69
7.2.290.0130.00616.62
7.2.130.0040.00816.96
7.2.120.0060.00316.80
7.2.110.0030.00716.71
7.2.100.0080.00316.78
7.2.90.0120.00316.79
7.2.80.0070.00416.46
7.2.70.0030.00917.10
7.2.60.0020.01216.75
7.2.50.0090.00616.80
7.2.40.0030.00617.06
7.2.30.0060.00916.94
7.2.20.0000.01216.84
7.2.10.0070.00316.88
7.2.00.0050.00918.04
7.1.250.0000.01315.59
7.1.240.0040.00715.43
7.1.230.0130.00015.68
7.1.220.0060.00915.67
7.1.210.0070.00315.69
7.1.200.0060.00715.58
7.1.190.0000.01415.71
7.1.180.0000.01515.38
7.1.170.0000.00815.76
7.1.160.0030.00915.28
7.1.150.0100.00015.64
7.1.140.0040.01115.64
7.1.130.0030.00915.29
7.1.120.0000.01415.63
7.1.110.0070.00315.58
7.1.100.0060.00616.91
7.1.90.0030.01015.59
7.1.80.0090.00615.56
7.1.70.0010.00816.24
7.1.60.0100.00717.43
7.1.50.0150.00725.11
7.1.40.0070.00715.72
7.1.30.0060.00315.73
7.1.20.0040.01215.84
7.1.10.0100.00315.86
7.1.00.0040.04219.14
7.0.330.0000.00915.30
7.0.320.0000.00815.30
7.0.310.0000.00815.13
7.0.300.0030.00915.46
7.0.290.0060.00315.20
7.0.280.0040.01115.38
7.0.270.0030.01015.04
7.0.260.0000.00815.47
7.0.250.0030.01015.33
7.0.240.0090.00315.40
7.0.230.0060.00615.33
7.0.220.0110.00415.11
7.0.210.0080.00415.42
7.0.200.0050.00715.99
7.0.190.0030.01015.27
7.0.180.0060.00615.05
7.0.170.0000.01415.57
7.0.160.0090.00015.30
7.0.150.0070.00315.37
7.0.140.0070.00715.30
7.0.130.0040.00714.81
7.0.120.0060.00615.21
7.0.110.0140.00015.36
7.0.100.0040.00715.53
7.0.90.0030.00715.39
7.0.80.0040.00415.23
7.0.70.0060.00615.41
7.0.60.0130.04017.60
7.0.50.0060.04216.67
7.0.40.0100.04316.58
7.0.30.0120.04016.73
7.0.20.0110.02516.71
7.0.10.0030.03916.64
7.0.00.0030.04716.72
5.6.380.0060.00614.28
5.6.370.0070.00314.34
5.6.360.0070.00414.16
5.6.350.0070.00714.02
5.6.340.0030.00914.28
5.6.330.0060.00614.54
5.6.320.0030.00913.99
5.6.310.0090.00614.20
5.6.300.0040.00814.36
5.6.290.0000.01514.41
5.6.280.0060.02917.50
5.6.270.0050.00514.53
5.6.260.0030.01014.20
5.6.250.0100.00314.32
5.6.240.0060.00613.91
5.6.230.0040.00714.21
5.6.220.0030.01014.37
5.6.210.0050.04017.41
5.6.200.0070.04316.31
5.6.190.0050.04617.28
5.6.180.0180.03717.37
5.6.170.0160.04317.36
5.6.160.0050.03017.16
5.6.150.0020.05016.19
5.6.140.0110.03016.22
5.6.130.0110.02516.34
5.6.120.0040.02917.58
5.6.110.0070.03917.81
5.6.100.0030.02717.71
5.6.90.0050.02517.71
5.6.80.0080.03817.35
5.6.70.0100.00314.25
5.6.60.0100.00314.13
5.6.50.0080.00813.92
5.6.40.0040.00714.53
5.6.30.0030.01014.14
5.6.20.0060.00613.86
5.6.10.0060.00614.23
5.6.00.0030.01014.50
5.5.380.0100.00311.23
5.5.370.0070.00711.21
5.5.360.0000.00611.02
5.5.350.0050.04015.74
5.5.340.0080.03114.58
5.5.330.0070.03815.67
5.5.320.0030.03315.56
5.5.310.0180.04315.70
5.5.300.0030.02314.42
5.5.290.0020.02514.60
5.5.280.0080.03815.82
5.5.270.0080.04015.88
5.5.260.0080.03915.84
5.5.250.0160.03615.83
5.5.240.0130.02215.48
5.5.230.0040.00410.90
5.5.220.0060.00010.93
5.5.210.0050.00511.00
5.5.200.0040.00410.90
5.5.190.0030.00710.90
5.5.180.0040.00411.02
5.5.170.0070.00010.90
5.5.160.0000.00910.99
5.5.150.0070.00011.13
5.5.140.0000.00911.10
5.5.130.0030.00610.90
5.5.120.0000.00610.90
5.5.110.0000.01211.16
5.5.100.0060.00311.07
5.5.90.0090.00011.00
5.5.80.0070.00310.90
5.5.70.0060.00611.04
5.5.60.0040.00510.90
5.5.50.0030.00310.90
5.5.40.0060.00310.96
5.5.30.0000.00710.90
5.5.20.0050.00810.90
5.5.10.0050.00510.91
5.5.00.0030.00910.90
5.4.450.0500.03715.16
5.4.440.0540.03015.27
5.4.430.0480.03915.00
5.4.420.0700.03115.03
5.4.410.0730.03015.16
5.4.400.0620.02815.08
5.4.390.0600.03514.92
5.4.380.0580.03015.03
5.4.370.0610.02514.97
5.4.360.0470.03115.02
5.4.350.0440.02915.10
5.4.340.0450.03015.09
5.4.330.0040.00410.90
5.4.320.0470.03214.91
5.4.310.0460.03715.10
5.4.300.0550.03014.98
5.4.290.0460.02815.10
5.4.280.0480.03115.09
5.4.270.0480.02515.10
5.4.260.0430.03015.02
5.4.250.0480.02815.10
5.4.240.0380.03315.06
5.4.230.0410.03315.08
5.4.220.0450.03615.01
5.4.210.0470.03415.08
5.4.200.0430.03315.12
5.4.190.0590.02415.10
5.4.180.0580.02515.07
5.4.170.0490.03114.90
5.4.160.0540.03615.01
5.4.150.0430.02815.03
5.4.140.0530.02713.61
5.4.130.0450.03413.60
5.4.120.0450.02513.70
5.4.110.0460.02513.67
5.4.100.0410.02813.60
5.4.90.0400.02613.72
5.4.80.0450.02613.70
5.4.70.0040.03813.67
5.4.60.0000.02313.64
5.4.50.0030.02813.68
5.4.40.0120.01813.48
5.4.30.0200.02713.55
5.4.20.0200.01813.55
5.4.10.0080.00410.90
5.4.00.0040.00410.90

preferences:
13.08 ms | 454 KiB | 5 Q