3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Connect to Database $con=mysqli_connect("localhost", "root", "password", "user"); mysqli_query($con, "SET CHARACTER SET utf8"); if(isset($_POST['name'])) { $name = $_POST['name']; } else { } if(isset($_POST['age'])) { $age = $_POST['age']; } else { } //Grabs values from Database $stmt = mysqli_prepare($con, "SELECT * FROM user WHERE username = ? AND password = ?"); //Protects against SQL injection attacks mysqli_stmt_bind_param($stmt, "ss", $username, $password); //Execute mysqli_stmt_execute($stmt); //Bind results mysqli_stmt_bind_result($stmt, $userID, $name, $age, $username, $password); //Holds data of user returned $user = array(); //Stores returned data in the array while(mysqli_stmt_fetch($stmt)){ $user[name] = $name; $user[age] = $age; $user[username] = $username; $user[password] = $password; } //Turns array into a json echo json_encode($user); //Close Statment mysqli_stmt_close($stmt); //Close Connection mysqli_close($con); ?>

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.3.70.0110.00716.63
8.3.60.0040.01418.22
8.3.50.0250.00722.01
8.3.40.0110.00718.75
8.3.30.0070.00718.84
8.3.20.0080.00020.39
8.3.10.0040.00423.52
8.3.00.0080.00019.97
8.2.180.0070.01418.40
8.2.170.0090.00622.96
8.2.160.0100.00320.39
8.2.150.0000.00924.18
8.2.140.0080.00024.66
8.2.130.0000.00821.04
8.2.120.0080.00026.35
8.2.110.0090.00919.39
8.2.100.0030.00917.78
8.2.90.0050.00519.05
8.2.80.0040.00417.97
8.2.70.0030.00817.38
8.2.60.0040.00917.55
8.2.50.0030.00518.07
8.2.40.0090.00019.40
8.2.30.0030.00620.69
8.2.20.0000.00717.75
8.2.10.0040.00417.89
8.2.00.0030.00618.07
8.1.280.0130.00325.92
8.1.270.0030.00618.73
8.1.260.0080.00028.09
8.1.250.0040.00428.09
8.1.240.0090.00021.31
8.1.230.0110.00017.42
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0060.00317.23
8.1.190.0090.00417.10
8.1.180.0070.00018.10
8.1.170.0040.00418.59
8.1.160.0050.00220.70
8.1.150.0000.00718.77
8.1.140.0040.00419.54
8.1.130.0030.00317.65
8.1.120.0000.00717.33
8.1.110.0040.00417.23
8.1.100.0000.00717.38
8.1.90.0000.00717.23
8.1.80.0050.00317.24
8.1.70.0040.00417.16
8.1.60.0060.00317.47
8.1.50.0000.00817.37
8.1.40.0000.00817.42
8.1.30.0000.00817.50
8.1.20.0040.00417.59
8.1.10.0040.00417.51
8.1.00.0000.00817.47
8.0.300.0000.00718.77
8.0.290.0000.00816.75
8.0.280.0070.00018.43
8.0.270.0070.00017.25
8.0.260.0000.00617.21
8.0.250.0000.00717.00
8.0.240.0000.00716.89
8.0.230.0000.00717.02
8.0.220.0000.00716.84
8.0.210.0040.00416.77
8.0.200.0070.00016.92
8.0.190.0040.00416.98
8.0.180.0000.00716.92
8.0.170.0050.00316.85
8.0.160.0030.00316.92
8.0.150.0070.00016.82
8.0.140.0050.00216.88
8.0.130.0000.00513.41
8.0.120.0000.00816.77
8.0.110.0020.00516.74
8.0.100.0040.00416.79
8.0.90.0000.00716.92
8.0.80.0060.00916.84
8.0.70.0040.00416.95
8.0.60.0040.00416.76
8.0.50.0080.00016.89
8.0.30.0120.00616.95
8.0.20.0100.01017.40
8.0.10.0000.00717.00
8.0.00.0130.00516.90
7.4.330.0020.00216.70
7.4.320.0020.00516.41
7.4.300.0030.00316.39
7.4.290.0000.00816.46
7.4.280.0000.00816.43
7.4.270.0030.00316.40
7.4.260.0030.00316.36
7.4.250.0030.00616.36
7.4.240.0010.00616.46
7.4.230.0000.00716.40
7.4.220.0060.01016.36
7.4.210.0080.00616.57
7.4.200.0030.00316.57
7.4.160.0060.01416.43
7.4.150.0110.00717.40
7.4.140.0070.01517.86
7.4.130.0110.00716.49
7.4.120.0080.01316.41
7.4.110.0070.01016.56
7.4.100.0070.01016.61
7.4.90.0100.00716.53
7.4.80.0080.01419.39
7.4.70.0070.00816.29
7.4.60.0080.00816.57
7.4.50.0070.01016.44
7.4.40.0060.01216.64
7.4.30.0100.01316.49
7.4.00.0100.00314.82
7.3.330.0050.00013.16
7.3.320.0000.00613.26
7.3.310.0000.00816.34
7.3.300.0000.00716.31
7.3.290.0080.00616.30
7.3.280.0060.00916.27
7.3.270.0080.01117.40
7.3.260.0110.00716.61
7.3.250.0090.00916.52
7.3.240.0040.01216.52
7.3.230.0070.01016.49
7.3.210.0070.01016.39
7.3.200.0060.01016.31
7.3.190.0130.00316.21
7.3.180.0110.00616.57
7.3.170.0100.00616.38
7.3.160.0170.00016.13
7.2.330.0030.01716.54
7.2.320.0070.01016.59
7.2.310.0070.01416.51
7.2.300.0170.00016.68
7.2.290.0100.00616.18
7.2.60.0100.00316.75
7.2.00.0060.00919.06
7.1.200.0030.00915.59
7.1.100.0060.00617.72
7.1.70.0000.00716.82
7.1.60.0070.01819.13
7.1.50.0060.01216.63
7.1.00.0030.07322.57
7.0.200.0000.01016.69
7.0.90.0500.06720.10
7.0.80.0170.04319.85
7.0.70.0330.03019.88
7.0.60.0230.05319.85
7.0.50.0200.04320.30
7.0.40.0030.04320.08
7.0.30.0070.03320.19
7.0.20.0070.06320.17
7.0.10.0070.04320.17
7.0.00.0030.07319.95
5.6.280.0070.05720.87
5.6.230.0030.03720.70
5.6.220.0000.04020.57
5.6.210.0100.05720.71
5.6.200.0030.05321.02
5.6.190.0030.04021.05
5.6.180.0000.04721.19
5.6.170.0030.04720.94
5.6.160.0100.07021.11
5.6.150.0070.05321.14
5.6.140.0230.06721.08
5.6.130.0070.08320.96
5.6.120.0100.04721.03
5.6.110.0030.04321.04
5.6.100.0070.08721.05
5.6.90.0130.08021.03
5.6.80.0030.04320.47
5.6.70.0130.07020.39
5.6.60.0030.07720.31
5.6.50.0000.08720.38
5.6.40.0030.07020.53
5.6.30.0130.07720.32
5.6.20.0030.04720.38
5.6.10.0130.07320.43
5.6.00.0130.08020.39
5.5.370.0030.04720.33
5.5.360.0070.05720.30
5.5.350.0130.07720.38
5.5.340.0030.04320.88
5.5.330.0100.05020.93
5.5.320.0070.06320.88
5.5.310.0030.04020.88
5.5.300.0130.07720.83
5.5.290.0100.08320.87
5.5.280.0170.07020.80
5.5.270.0130.07720.90
5.5.260.0100.07720.86
5.5.250.0070.06720.73
5.5.240.0070.03720.31
5.5.230.0130.07320.26
5.5.220.0070.07320.02
5.5.210.0030.05320.10
5.5.200.0100.07020.28
5.5.190.0130.06320.22
5.5.180.0100.08020.21
5.5.160.0130.07320.10
5.5.150.0070.07319.98
5.5.140.0200.06020.18
5.5.130.0100.07320.21
5.5.120.0130.06720.18
5.5.110.0170.07320.18
5.5.100.0070.07320.03
5.5.90.0070.07020.06
5.5.80.0070.04720.05
5.5.70.0070.04020.08
5.5.60.0230.07020.15
5.5.50.0030.08319.94
5.5.40.0130.07320.04
5.5.30.0030.08020.10
5.5.20.0000.05720.03
5.5.10.0070.08320.13
5.5.00.0030.07320.03

preferences:
53.65 ms | 401 KiB | 5 Q