3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* Tell mysqli to throw an exception if an error occurs */ mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); /* The table engine has to support transactions */ $mysqli->query("CREATE TABLE IF NOT EXISTS `language` ( Code text NOT NULL, Speakers int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;"); /* Start transaction */ $mysqli->begin_transaction(); /* Insert some values */ $mysqli->query("INSERT INTO language(Code, Speakers) VALUES ('DE', 42000123)"); /* Try to insert invalid values */ $language_code = 'FR'; $native_speakers = 'Unknown'; $stmt = $mysqli->prepare('INSERT INTO language VALUES (?,?)'); $stmt->bind_param('ss', $language_code, $native_speakers); $stmt->execute(); /* If code reaches this point without errors then commit the data in database */ $mysqli->commit();

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.10.0060.01116.73
8.5.00.0120.01019.98
8.4.150.0040.00114.05
8.4.140.0130.00817.63
8.4.130.0130.00517.95
8.4.120.0070.00220.68
8.4.110.0130.00722.52
8.4.100.0150.00617.91
8.4.90.0040.00622.32
8.4.80.0040.00519.46
8.4.70.0110.01018.20
8.4.60.0130.00818.80
8.4.50.0070.00318.66
8.4.40.0030.00617.88
8.4.30.0060.00320.31
8.4.20.0130.00717.75
8.4.10.0060.01319.56
8.3.280.0110.01018.62
8.3.270.0100.01016.77
8.3.260.0110.00816.87
8.3.250.0110.00618.96
8.3.240.0110.00916.88
8.3.230.0090.00616.57
8.3.220.0110.00618.98
8.3.210.0010.00618.76
8.3.200.0040.00416.61
8.3.190.0020.00620.95
8.3.180.0120.00918.48
8.3.170.0110.00717.04
8.3.160.0030.00720.75
8.3.150.0150.00318.88
8.3.140.0080.00017.10
8.3.130.0030.00518.60
8.3.120.0040.00419.11
8.3.110.0050.00316.92
8.3.100.0060.00316.65
8.3.90.0040.00426.77
8.3.80.0030.00619.36
8.3.70.0110.00716.58
8.3.60.0120.00916.75
8.3.50.0130.00523.52
8.3.40.0110.00721.89
8.3.30.0070.00718.67
8.3.20.0030.00524.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.290.0140.00420.60
8.2.280.0090.00818.70
8.2.270.0130.00619.00
8.2.260.0090.00916.49
8.2.250.0080.00018.57
8.2.240.0030.01216.92
8.2.230.0000.00820.94
8.2.220.0040.00424.06
8.2.210.0100.00326.77
8.2.200.0030.00618.88
8.2.190.0110.00418.61
8.2.180.0150.00325.92
8.2.170.0140.00018.84
8.2.160.0110.00422.96
8.2.150.0050.00225.66
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0070.00026.35
8.2.110.0050.00522.09
8.2.100.0070.00717.77
8.2.90.0040.00417.63
8.2.80.0050.00318.65
8.2.70.0080.00017.63
8.2.60.0030.00517.80
8.2.50.0040.00418.07
8.2.40.0050.00318.03
8.2.30.0030.00618.02
8.2.20.0070.00018.04
8.2.10.0040.00419.09
8.2.00.0000.00719.28
8.1.330.0080.01122.07
8.1.320.0130.00816.00
8.1.310.0070.00018.33
8.1.300.0110.00719.84
8.1.290.0000.00930.84
8.1.280.0070.01325.92
8.1.270.0040.00423.99
8.1.260.0040.00428.09
8.1.250.0000.00728.09
8.1.240.0070.00422.05
8.1.230.0090.00322.75
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0000.00817.10
8.1.190.0000.00717.23
8.1.180.0000.00718.10
8.1.170.0000.00818.41
8.1.160.0070.00018.87
8.1.150.0000.00718.73
8.1.140.0050.00218.80
8.1.130.0030.00320.25
8.1.120.0040.00417.34
8.1.110.0000.00917.45
8.1.100.0040.00417.26
8.1.90.0030.00517.27
8.1.80.0000.00717.41
8.1.70.0030.00617.27
8.1.60.0040.00417.47
8.1.50.0040.00417.55
8.1.40.0000.00717.52
8.1.30.0040.00417.52
8.1.20.0040.00417.66
8.1.10.0120.00017.55
8.1.00.0040.00417.40
8.0.300.0040.00418.81
8.0.290.0050.00316.58
8.0.280.0030.00318.43
8.0.270.0040.00418.09
8.0.260.0000.00720.19
8.0.250.0000.00716.89
8.0.240.0000.00817.05
8.0.230.0070.00016.98
8.0.220.0060.00316.91
8.0.210.0000.00816.91
8.0.200.0030.00316.86
8.0.190.0050.00317.05
8.0.180.0070.00016.86
8.0.170.0060.00316.90
8.0.160.0030.00616.83
8.0.150.0000.00816.90
8.0.140.0000.00716.79
8.0.130.0080.00013.38
8.0.120.0000.00816.79
8.0.110.0000.00716.89
8.0.100.0040.00416.82
8.0.90.0050.00316.93
8.0.80.0090.00516.89
8.0.70.0040.00316.82
8.0.60.0040.00416.91
8.0.50.0000.00716.82
8.0.30.0110.00616.90
8.0.20.0110.00716.99
8.0.10.0000.00816.79
8.0.00.0110.01116.64
7.4.330.0050.00016.77
7.4.320.0000.00716.30
7.4.300.0000.00716.57
7.4.290.0040.00416.42
7.4.280.0100.00016.48
7.4.270.0000.00716.50
7.4.260.0000.00613.29
7.4.250.0000.00816.55
7.4.240.0000.00716.49
7.4.230.0000.00816.23
7.4.220.0030.00316.61
7.4.210.0090.00816.55
7.4.200.0000.00716.65
7.4.130.0130.00616.45
7.4.120.0100.00716.55
7.4.110.0070.01016.27
7.4.100.0040.01516.29
7.4.90.0110.00616.45
7.4.80.0070.01016.45
7.4.70.0080.01216.20
7.4.60.0080.00816.27
7.4.50.0030.01416.43
7.4.40.0180.00016.48
7.4.30.0090.00616.51
7.4.20.0070.01016.46
7.4.10.0040.01316.19
7.4.00.0060.01216.68
7.3.330.0040.00416.36
7.3.320.0050.00013.10
7.3.310.0040.00416.14
7.3.300.0030.00316.30
7.3.290.0100.00716.33
7.3.260.0130.01016.60
7.3.240.0090.00816.51
7.3.230.0130.00416.41
7.3.220.0120.00616.09
7.3.210.0070.01016.46
7.3.200.0100.00716.40
7.3.190.0070.01116.18
7.3.180.0060.01016.32
7.3.170.0080.00816.30
7.3.160.0080.00816.45
7.3.150.0060.00916.35
7.3.140.0080.00816.09
7.3.130.0080.00816.22
7.3.120.0170.00016.59
7.3.110.0120.00316.25
7.3.100.0120.00616.29
7.3.90.0110.00816.13
7.3.80.0050.01116.20
7.3.70.0040.01216.36
7.3.60.0140.00316.15
7.3.50.0120.00416.19
7.3.40.0060.01016.30
7.3.30.0100.00816.27
7.3.20.0200.00016.29
7.3.10.0110.00816.12
7.3.00.0030.01816.14
7.2.340.0120.00616.24
7.2.330.0100.01016.22
7.2.320.0080.01516.38
7.2.310.0100.01016.47
7.2.300.0120.00616.36
7.2.290.0130.00416.32
7.2.280.0070.01016.48
7.2.270.0140.00316.43
7.2.260.0080.00916.44
7.2.250.0070.01016.21
7.2.240.0080.01016.46
7.2.230.0120.00616.23
7.2.220.0100.00616.45
7.2.210.0070.01016.27
7.2.200.0090.01516.32
7.2.190.0090.00916.43
7.2.180.0030.01316.48
7.2.170.0110.00716.29
7.2.160.0080.00816.20
7.2.150.0100.00716.43
7.2.140.0040.01316.36
7.2.130.0070.01116.43
7.2.120.0080.00816.47
7.2.110.0110.00816.16
7.2.100.0040.01516.27
7.2.90.0060.01416.43
7.2.80.0110.00716.45
7.2.70.0030.01616.50
7.2.60.0130.00416.44
7.2.50.0110.00516.53
7.2.40.0340.00916.42
7.2.30.0130.00716.45
7.2.20.0090.01016.36
7.2.10.0100.00716.22
7.2.00.0060.01216.27

preferences:
35.37 ms | 403 KiB | 5 Q