3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Create connection $con=mysqli_connect("localhost","jeppausv_test1","Test1997","jeppausv_checkin"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } // This SQL statement selects ALL from the table 'Locations' $sql = "SELECT * FROM Locations"; // Check if there are results if ($result = mysqli_query($con, $sql)) { // If so, then create a results array and a temporary one // to hold the data $resultArray = array(); $tempArray = array(); // Loop through each row in the result set while($row = $result->fetch_object()) { // Add each row into our results array $tempArray = $row; array_push($resultArray, $tempArray); } // Finally, encode the array to JSON and output the results echo json_encode( $resultArray ); } // Close connections 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.0090.01218.42
8.3.60.0200.00016.50
8.3.50.0150.00522.10
8.3.40.0140.00718.62
8.3.30.0120.00318.79
8.3.20.0040.00420.16
8.3.10.0000.00823.64
8.3.00.0040.00419.85
8.2.190.0110.00716.88
8.2.180.0070.01116.88
8.2.170.0110.00722.96
8.2.160.0030.01020.09
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0000.00921.00
8.2.120.0060.00326.35
8.2.110.0040.00422.12
8.2.100.0000.01217.80
8.2.90.0040.00419.05
8.2.80.0080.00017.97
8.2.70.0000.01117.63
8.2.60.0050.00317.68
8.2.50.0080.00018.07
8.2.40.0000.00822.38
8.2.30.0040.00420.52
8.2.20.0000.00717.70
8.2.10.0000.00718.02
8.2.00.0040.00418.00
8.1.280.0090.00625.92
8.1.270.0040.00420.21
8.1.260.0030.00528.09
8.1.250.0040.00428.09
8.1.240.0090.00022.46
8.1.230.0070.00419.02
8.1.220.0030.00517.74
8.1.210.0000.00818.77
8.1.200.0030.00617.22
8.1.190.0060.00317.23
8.1.180.0050.00218.10
8.1.170.0040.00418.34
8.1.160.0000.00820.66
8.1.150.0070.00018.72
8.1.140.0040.00419.46
8.1.130.0050.00317.49
8.1.120.0050.00217.25
8.1.110.0080.00017.41
8.1.100.0040.00417.26
8.1.90.0000.00717.37
8.1.80.0000.00917.22
8.1.70.0070.00017.32
8.1.60.0060.00617.48
8.1.50.0060.00317.50
8.1.40.0040.00417.36
8.1.30.0060.00317.68
8.1.20.0060.00317.63
8.1.10.0030.00617.50
8.1.00.0040.00417.38
8.0.300.0000.00718.77
8.0.290.0000.00916.63
8.0.280.0040.00318.32
8.0.270.0000.00717.20
8.0.260.0030.00317.22
8.0.250.0030.00316.94
8.0.240.0070.00016.84
8.0.230.0050.00317.03
8.0.220.0040.00416.82
8.0.210.0000.00816.87
8.0.200.0030.00316.86
8.0.190.0030.00916.96
8.0.180.0050.00216.86
8.0.170.0030.00516.96
8.0.160.0000.00716.95
8.0.150.0050.00216.77
8.0.140.0040.00416.93
8.0.130.0030.00313.29
8.0.120.0040.00416.78
8.0.110.0040.00416.82
8.0.100.0000.00816.71
8.0.90.0070.00016.80
8.0.80.0150.00016.84
8.0.70.0000.00716.85
8.0.60.0000.00816.90
8.0.50.0030.00316.87
8.0.30.0090.01017.20
8.0.20.0070.01117.40
8.0.10.0040.00416.84
8.0.00.0110.00816.64
7.4.330.0050.00016.69
7.4.320.0030.00316.39
7.4.300.0030.00316.54
7.4.290.0000.00716.55
7.4.280.0000.00716.56
7.4.270.0030.00316.40
7.4.260.0000.00716.44
7.4.250.0040.00416.29
7.4.240.0070.00016.54
7.4.230.0030.00316.21
7.4.220.0040.01416.63
7.4.210.0110.00416.46
7.4.200.0030.00316.49
7.4.160.0030.01316.47
7.4.150.0140.00317.40
7.4.140.0090.01317.86
7.4.130.0100.01016.47
7.4.120.0140.00416.32
7.4.110.0060.01216.66
7.4.100.0060.01116.36
7.4.90.0100.00716.38
7.4.80.0040.01319.39
7.4.70.0100.00716.63
7.4.60.0160.00016.33
7.4.50.0090.00316.39
7.4.40.0230.00016.59
7.4.30.0070.01016.36
7.4.00.0080.00914.72
7.3.330.0000.00513.02
7.3.320.0000.00613.04
7.3.310.0070.00016.11
7.3.300.0070.00016.29
7.3.290.0030.00316.28
7.3.280.0080.00816.29
7.3.270.0080.00817.40
7.3.260.0070.01016.39
7.3.250.0130.00616.31
7.3.240.0070.01116.29
7.3.230.0060.01216.39
7.3.210.0060.01616.48
7.3.200.0060.01716.34
7.3.190.0130.00616.36
7.3.180.0100.00716.25
7.3.170.0160.00616.63
7.3.160.0130.00316.39
7.3.120.0080.00814.53
7.3.110.0040.01414.76
7.3.100.0080.00615.02
7.3.90.0070.00714.63
7.3.80.0100.00714.69
7.3.70.0030.01214.63
7.3.60.0030.01314.78
7.3.50.0050.00914.66
7.3.40.0110.00314.44
7.3.30.0070.00714.66
7.3.20.0000.01516.68
7.3.10.0120.00316.79
7.3.00.0070.01016.61
7.2.330.0090.00916.54
7.2.320.0150.00916.43
7.2.310.0120.00316.12
7.2.300.0040.01216.51
7.2.290.0060.01116.34
7.2.250.0000.02015.11
7.2.240.0070.01015.09
7.2.230.0000.01114.92
7.2.220.0040.01214.57
7.2.210.0090.00314.75
7.2.200.0000.01414.78
7.2.190.0100.00614.86
7.2.180.0060.00614.73
7.2.170.0030.00914.85
7.2.60.0030.01016.86
7.2.00.0100.00319.38
7.1.330.0000.01315.59
7.1.320.0040.01115.53
7.1.310.0070.00715.52
7.1.300.0130.00015.47
7.1.290.0000.01515.73
7.1.280.0040.00815.52
7.1.270.0030.01015.55
7.1.260.0090.00015.63
7.1.200.0030.00515.45
7.1.100.0100.00017.93
7.1.70.0060.00616.98
7.1.60.0100.01419.52
7.1.50.0100.01016.54
7.1.00.0070.07322.54
7.0.200.0040.00416.65
7.0.90.0570.08319.88
7.0.80.0530.06719.92
7.0.70.0430.03720.06
7.0.60.0400.04719.94
7.0.50.0600.07720.34
7.0.40.0130.06720.05
7.0.30.0170.07320.00
7.0.20.0000.09020.09
7.0.10.0030.05720.13
7.0.00.0070.08020.16
5.6.280.0030.07321.09
5.6.240.0170.07720.52
5.6.230.0030.04320.50
5.6.220.0130.07020.58
5.6.210.0000.05320.52
5.6.200.0070.07321.11
5.6.190.0170.06021.03
5.6.180.0030.08021.07
5.6.170.0130.07721.02
5.6.160.0100.06321.01
5.6.150.0070.08021.04
5.6.140.0030.08321.04
5.6.130.0030.05021.00
5.6.120.0070.07321.04
5.6.110.0070.06320.93
5.6.100.0130.07721.03
5.6.90.0100.05320.98
5.6.80.0030.07020.33
5.6.70.0030.08320.38
5.6.60.0030.05320.50
5.6.50.0070.08320.38
5.6.40.0100.06720.31
5.6.30.0170.07020.29
5.6.20.0000.05720.31
5.6.10.0270.03020.48
5.6.00.0030.08320.30
5.5.380.0130.06320.54
5.5.370.0000.04020.54
5.5.360.0100.05020.53
5.5.350.0200.05020.37
5.5.340.0070.04720.79
5.5.330.0030.08020.79
5.5.320.0070.07720.83
5.5.310.0070.07320.88
5.5.300.0170.04020.76
5.5.290.0030.06020.73
5.5.280.0130.06720.79
5.5.270.0100.08020.85
5.5.260.0200.06320.90
5.5.250.0130.07720.61
5.5.240.0030.04720.27
5.5.230.0130.04020.14
5.5.220.0030.05320.21
5.5.210.0100.07020.24
5.5.200.0100.07320.22
5.5.190.0100.04719.98
5.5.180.0070.07720.18
5.5.160.0070.06020.11
5.5.150.0030.04320.22
5.5.140.0130.04320.27
5.5.130.0030.04720.22
5.5.120.0130.07320.20
5.5.110.0030.04720.21
5.5.100.0030.08720.10
5.5.90.0170.05720.09
5.5.80.0030.05020.13
5.5.70.0030.08320.16
5.5.60.0130.06720.14
5.5.50.0100.04320.06
5.5.40.0070.08320.11
5.5.30.0100.05320.04
5.5.20.0100.04719.99
5.5.10.0030.08319.94
5.5.00.0170.05020.04

preferences:
49.15 ms | 401 KiB | 5 Q