3v4l.org

run code in 300+ PHP versions simultaneously
<?php $servername = "localhost"; $username = "root"; $password = ""; $conn = new mysql($servername, $username, $password); if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } //this is for create the DB. $sql = "Create database A_2"; if ($conn->query($sql) === TRUE) { echo "Success! Database created"; } else { echo "Chomp! There is an error, please check:" . $conn->error; } $conn->close(); ?>

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.60.0070.01418.15
8.3.50.0070.00716.37
8.3.40.0070.00719.02
8.3.30.0120.00318.79
8.3.20.0000.00820.22
8.3.10.0040.00423.54
8.3.00.0050.00520.52
8.2.180.0120.00316.63
8.2.170.0100.01022.96
8.2.160.0070.00722.01
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0070.00717.75
8.2.110.0030.00619.38
8.2.100.0040.00717.63
8.2.90.0040.00419.30
8.2.80.0000.00817.97
8.2.70.0060.00317.50
8.2.60.0060.00317.93
8.2.50.0060.00318.07
8.2.40.0030.00521.12
8.2.30.0030.00619.79
8.2.20.0040.00417.60
8.2.10.0040.00418.11
8.2.00.0000.00717.92
8.1.280.0090.01225.92
8.1.270.0060.00320.23
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0090.00022.14
8.1.230.0060.00617.54
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0000.01017.35
8.1.190.0000.00917.22
8.1.180.0050.00318.10
8.1.170.0030.00618.48
8.1.160.0030.00321.85
8.1.150.0070.00018.80
8.1.140.0070.00017.28
8.1.130.0070.00017.71
8.1.120.0070.00017.29
8.1.110.0000.00717.37
8.1.100.0080.00017.46
8.1.90.0000.00717.41
8.1.80.0040.00417.24
8.1.70.0030.00317.34
8.1.60.0040.00417.40
8.1.50.0060.00317.49
8.1.40.0030.00517.49
8.1.30.0080.00017.60
8.1.20.0070.00017.53
8.1.10.0060.00317.55
8.1.00.0040.00417.38
8.0.300.0000.00818.77
8.0.290.0000.00816.58
8.0.280.0000.00718.38
8.0.270.0000.00717.14
8.0.260.0000.00617.09
8.0.250.0050.00217.01
8.0.240.0070.00016.84
8.0.230.0030.00316.97
8.0.220.0000.00716.86
8.0.210.0040.00416.81
8.0.200.0050.00516.89
8.0.190.0000.00716.80
8.0.180.0000.00716.92
8.0.170.0030.00616.96
8.0.160.0000.00816.75
8.0.150.0070.00016.78
8.0.140.0040.00416.84
8.0.130.0030.00313.24
8.0.120.0000.00816.83
8.0.110.0040.00416.84
8.0.100.0040.00416.75
8.0.90.0000.00716.71
8.0.80.0070.00716.91
8.0.70.0080.00016.87
8.0.60.0050.00216.86
8.0.50.0050.00316.73
8.0.30.0060.01517.15
8.0.20.0150.00817.40
8.0.10.0030.00516.84
8.0.00.0110.00716.65
7.4.330.0050.00015.08
7.4.320.0000.00616.43
7.4.300.0030.00316.44
7.4.290.0050.00216.64
7.4.280.0060.00316.50
7.4.270.0000.00716.58
7.4.260.0000.00716.48
7.4.250.0070.00016.55
7.4.240.0030.00516.60
7.4.230.0070.00016.57
7.4.220.0060.00916.62
7.4.210.0100.00616.54
7.4.200.0000.00716.46
7.4.160.0120.00316.46
7.4.150.0080.01117.40
7.4.140.0100.01117.86
7.4.130.0080.01216.49
7.4.120.0090.01116.50
7.4.110.0100.01016.37
7.4.100.0130.01016.48
7.4.90.0080.00816.55
7.4.80.0130.00719.39
7.4.70.0110.00616.54
7.4.60.0120.00616.64
7.4.50.0050.00016.51
7.4.40.0080.01016.38
7.4.30.0060.01516.61
7.4.00.0030.01415.05
7.3.330.0040.00413.18
7.3.320.0050.00313.10
7.3.310.0030.00316.19
7.3.300.0060.00016.25
7.3.290.0100.00516.27
7.3.280.0090.01016.25
7.3.270.0180.00017.40
7.3.260.0070.01116.21
7.3.250.0090.01016.31
7.3.240.0140.00416.15
7.3.230.0120.00616.44
7.3.210.0060.01216.45
7.3.200.0110.00816.36
7.3.190.0070.01016.51
7.3.180.0040.01216.30
7.3.170.0070.01416.45
7.3.160.0130.00316.49
7.2.330.0090.01616.47
7.2.320.0090.00916.58
7.2.310.0150.00616.51
7.2.300.0030.01316.22
7.2.290.0100.00716.58
7.2.60.0080.00416.75
7.2.00.0070.01019.34
7.1.200.0000.01215.58
7.1.100.0100.00017.84
7.1.70.0030.01016.92
7.1.60.0090.01519.18
7.1.50.0100.01316.84
7.1.00.0070.07322.45
7.0.200.0040.00416.61
7.0.60.0070.04019.89
7.0.50.0100.07717.86
7.0.40.0030.04320.23
7.0.30.0330.07720.18
7.0.20.0270.05020.04
7.0.10.0030.08320.00
7.0.00.0000.05020.19
5.6.280.0000.07021.04
5.6.210.0070.04020.44
5.6.200.0130.07018.25
5.6.190.0030.04320.39
5.6.180.0430.06320.61
5.6.170.0270.07720.50
5.6.160.0130.05020.52
5.6.150.0030.05718.18
5.6.140.0100.03018.14
5.6.130.0070.04718.14
5.6.120.0070.08721.09
5.6.110.0030.07321.00
5.6.100.0030.07720.88
5.6.90.0070.08321.02
5.6.80.0070.03720.37
5.5.350.0300.05720.32
5.5.340.0000.04317.92
5.5.330.0000.06020.42
5.5.320.0430.07020.18
5.5.310.0170.06720.17
5.5.300.0030.04017.96
5.5.290.0000.08717.91
5.5.280.0100.06320.95
5.5.270.0100.06720.64
5.5.260.0100.07320.86
5.5.250.0000.08020.75
5.5.240.0030.07320.15
5.4.450.1970.04719.39
5.4.440.1930.04719.25
5.4.430.1800.04019.48
5.4.420.1870.03719.13
5.4.410.1770.05019.30
5.4.400.2030.03719.11
5.4.390.1870.03719.10
5.4.380.1730.03719.09
5.4.370.1600.03319.16
5.4.360.1800.04719.23
5.4.350.1870.04018.95
5.4.340.1600.04319.08
5.4.320.1770.04718.88
5.4.310.1830.04318.91
5.4.300.1800.03719.15
5.4.290.1770.04018.91
5.4.280.1830.05318.88
5.4.270.1830.04719.24
5.4.260.1870.04319.09
5.4.250.1830.05018.93
5.4.240.1870.04019.14
5.4.230.1930.03719.23
5.4.220.1870.05018.79
5.4.210.1600.04018.92
5.4.200.1800.05018.93
5.4.190.1930.04319.07
5.4.180.1900.04019.11
5.4.170.1570.04318.88
5.4.160.1630.03319.06
5.4.150.1730.03719.23
5.4.140.1870.03716.27
5.4.130.1630.03716.33
5.4.120.1870.04016.33
5.4.110.1930.04016.39
5.4.100.1630.04016.21
5.4.90.1630.03316.47
5.4.80.1870.04016.42
5.4.70.1670.03716.38
5.4.60.1870.04016.36
5.4.50.1670.03016.39
5.4.40.1800.04316.28
5.4.30.1830.03316.19
5.4.20.1970.03716.15
5.4.10.1830.03316.45
5.4.00.1900.03715.88
5.3.290.1930.04314.51
5.3.280.1800.04714.54
5.3.270.1900.04314.62
5.3.260.1900.04314.61
5.3.250.1700.03314.46
5.3.240.2070.04314.70
5.3.230.1930.05014.46
5.3.220.1870.03014.61
5.3.210.0170.06314.40
5.3.200.0070.06014.42
5.3.190.0170.03714.66
5.3.180.0100.04014.40
5.3.170.0170.03314.58
5.3.160.0130.04014.51
5.3.150.0130.03714.42
5.3.140.0170.04714.60
5.3.130.0130.04014.39
5.3.120.0100.04314.50
5.3.110.0170.03714.59
5.3.100.0170.07713.89
5.3.90.0100.04313.93
5.3.80.0200.03313.86
5.3.70.0200.04013.86
5.3.60.0100.04714.11
5.3.50.0130.03713.89
5.3.40.0130.03713.74
5.3.30.0130.03713.81
5.3.20.0170.04013.54
5.3.10.0170.03313.49
5.3.00.0130.03713.65
5.2.170.0100.03311.16
5.2.160.0100.03011.10
5.2.150.0130.02710.98
5.2.140.0130.02711.18
5.2.130.0100.03011.18
5.2.120.0100.03010.96
5.2.110.0100.03010.93
5.2.100.0130.03311.01
5.2.90.0100.03011.16
5.2.80.0170.02311.04
5.2.70.0070.03311.03
5.2.60.0070.03310.99
5.2.50.0100.04010.96
5.2.40.0030.02710.84
5.2.30.0100.02710.83
5.2.20.0230.02310.86
5.2.10.0100.03010.97
5.2.00.0130.02710.87
5.1.60.0130.0209.96
5.1.50.0170.0209.96
5.1.40.0070.0309.92
5.1.30.0100.02710.39
5.1.20.0130.02310.35
5.1.10.0070.04310.19
5.1.00.0130.02310.00
5.0.50.0130.0138.48
5.0.40.0070.0178.39
5.0.30.0100.0338.34
5.0.20.0030.0208.12
5.0.10.0070.0238.14
5.0.00.0070.0308.08
4.4.90.0070.0237.88
4.4.80.0030.0177.88
4.4.70.0030.0177.88
4.4.60.0130.0177.88
4.4.50.0070.0177.88
4.4.40.0070.0237.88
4.4.30.0070.0277.88
4.4.20.0100.0177.88
4.4.10.0030.0177.88
4.4.00.0030.0277.88
4.3.110.0030.0177.88
4.3.100.0100.0137.88
4.3.90.0030.0177.88
4.3.80.0070.0237.88
4.3.70.0070.0177.88
4.3.60.0030.0177.88
4.3.50.0070.0307.88
4.3.40.0200.0137.88
4.3.30.0030.0137.88
4.3.20.0030.0137.88
4.3.10.0030.0337.88
4.3.00.0000.0377.88

preferences:
56.99 ms | 400 KiB | 5 Q