3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pdo = new PDO('sqlite::memory:'); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $pdo->exec("DROP TABLE IF EXISTS prefs"); $pdo->exec("CREATE TABLE prefs( uid MEDIUMINT UNSIGNED NOT NULL, show_email BOOL NOT NULL, show_smiles BOOL NOT NULL, timezone_offset TINYINT NOT NULL, messages_on_page TINYINT UNSIGNED NOT NULL)"); // Insert first row $pdo->exec("INSERT INTO prefs VALUES(6, 1, 1, 0, 5)"); // Update row with id = 6 $prefs = array( 'show_email' => (bool) 1, 'show_smiles' => (bool) 1, 'timezone_offset' => 0, 'messages_on_page' => 999, 'uid', 6 ); $st = $pdo->prepare("UPDATE prefs SET show_email=?, show_smiles=?, timezone_offset=?, messages_on_page=? WHERE uid=?"); $st->bindValue(1, $prefs['show_email'], PDO::PARAM_BOOL); $st->bindValue(2, $prefs['show_smiles'], PDO::PARAM_BOOL); $st->bindValue(3, $prefs['timezone_offset'], PDO::PARAM_INT); $st->bindValue(4, $prefs['messages_on_page'], PDO::PARAM_INT); $id = 6; $st->bindParam(5, $id, PDO::PARAM_INT); if (!$st->execute()) { print_r($pdo->errorInfo()); exit; } $statement = $pdo->prepare('SELECT * FROM prefs'); $statement->execute(); print_r($statement->fetchAll(PDO::FETCH_ASSOC));

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.0100.01317.40
8.5.00.0120.01220.76
8.4.160.0120.01122.38
8.4.150.0010.00114.05
8.4.140.0170.00818.75
8.4.130.0100.01118.80
8.4.120.0100.01021.26
8.4.110.0100.01023.25
8.4.100.0130.00718.56
8.4.90.0140.00719.74
8.4.80.0110.00818.46
8.4.70.0170.00618.60
8.4.60.0160.00519.52
8.4.50.0070.00618.75
8.4.40.0180.00320.08
8.4.30.0120.00922.98
8.4.20.0060.01319.32
8.4.10.0060.00320.51
8.3.290.0120.00921.60
8.3.280.0130.00919.25
8.3.270.0150.00617.60
8.3.260.0110.00817.59
8.3.250.0030.00420.00
8.3.240.0150.00617.61
8.3.230.0090.00917.60
8.3.220.0120.00417.95
8.3.210.0090.00517.77
8.3.200.0050.00517.40
8.3.190.0090.01018.01
8.3.180.0080.01117.57
8.3.170.0210.00019.80
8.3.160.0110.00717.47
8.3.150.0070.00419.79
8.3.140.0060.00319.26
8.3.130.0060.00319.28
8.3.120.0090.00619.71
8.3.110.0060.01320.94
8.3.100.0040.01224.06
8.3.90.0150.00626.77
8.3.80.0000.01019.43
8.3.70.0130.00417.38
8.3.60.0100.01019.18
8.3.50.0150.00918.46
8.3.40.0160.00019.71
8.3.30.0090.00619.67
8.3.20.0040.00421.59
8.3.10.0110.00721.46
8.3.00.0030.00523.02
8.2.300.0120.01021.14
8.2.290.0110.00921.46
8.2.280.0040.00419.37
8.2.270.0040.00418.22
8.2.260.0040.01119.99
8.2.250.0040.01119.55
8.2.240.0160.00317.91
8.2.230.0030.00622.58
8.2.220.0070.00337.54
8.2.210.0090.00926.77
8.2.200.0000.01117.50
8.2.190.0090.00619.19
8.2.180.0130.01019.54
8.2.170.0110.00722.96
8.2.160.0060.01221.27
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00319.98
8.2.120.0030.00626.35
8.2.110.0070.00421.93
8.2.100.0030.00920.45
8.2.90.0030.00620.45
8.2.80.0060.00318.91
8.2.70.0040.00418.91
8.2.60.0040.00419.22
8.2.50.0100.00318.38
8.2.40.0040.00420.34
8.2.30.0000.00919.99
8.2.20.0000.00819.07
8.2.10.0060.00320.21
8.2.00.0000.00918.84
8.1.330.0130.00721.23
8.1.320.0090.01217.06
8.1.310.0060.00317.76
8.1.300.0100.00718.67
8.1.290.0090.00030.84
8.1.280.0120.00325.92
8.1.270.0050.00319.81
8.1.260.0110.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00624.70
8.1.230.0060.00623.48
8.1.220.0050.00318.52
8.1.210.0050.00319.72
8.1.200.0060.00318.22
8.1.190.0030.00518.10
8.1.180.0030.00618.28
8.1.170.0000.00819.39
8.1.160.0040.00419.84
8.1.150.0000.00819.62
8.1.140.0040.00421.20
8.1.130.0050.00218.17
8.1.120.0000.00718.29
8.1.110.0000.00918.26
8.1.100.0050.00318.36
8.1.90.0000.00718.26
8.1.80.0050.00218.22
8.1.70.0080.00018.27
8.1.60.0000.00818.45
8.1.50.0080.00318.45
8.1.40.0060.00318.35
8.1.30.0030.00518.43
8.1.20.0060.00318.62
8.1.10.0000.00818.43
8.1.00.0080.00018.39
8.0.300.0000.00820.43
8.0.290.0050.00317.75
8.0.280.0000.00719.25
8.0.270.0080.00017.91
8.0.260.0040.00417.71
8.0.250.0000.00817.86
8.0.240.0000.00817.95
8.0.230.0000.00817.94
8.0.220.0000.00817.86
8.0.210.0040.00417.76
8.0.200.0070.00017.93
8.0.190.0040.00417.88
8.0.180.0030.00617.84
8.0.170.0070.00317.84
8.0.160.0030.00617.89
8.0.150.0040.00417.81
8.0.140.0040.00417.70
8.0.130.0000.00714.24
8.0.120.0040.00417.74
8.0.110.0000.00917.68
8.0.100.0080.00017.84
8.0.90.0040.00417.65
8.0.80.0030.01317.82
8.0.70.0000.00817.68
8.0.60.0000.00817.66
8.0.50.0040.00417.84
8.0.30.0090.01017.94
8.0.20.0160.00318.27
8.0.10.0070.00017.88
8.0.00.0140.01017.66
7.4.330.0000.00815.55
7.4.320.0030.00317.32
7.4.300.0030.00317.53
7.4.290.0070.00017.43
7.4.280.0030.00717.52
7.4.270.0070.00317.23
7.4.260.0000.00717.37
7.4.250.0070.00017.28
7.4.240.0000.00717.21
7.4.230.0000.00817.52
7.4.220.0000.00817.45
7.4.210.0060.01117.40
7.4.200.0050.00217.39
7.4.160.0090.00817.45
7.4.140.0090.00917.86
7.4.130.0120.00617.45
7.4.120.0120.00917.38
7.4.110.0070.01117.32
7.4.100.0120.01217.13
7.4.90.0100.01717.26
7.4.80.0090.01619.39
7.4.70.0040.01417.45
7.4.60.0150.01217.29
7.4.50.0030.01717.05
7.4.40.0090.00917.36
7.4.10.0060.01115.75
7.4.00.0100.00815.72
7.3.330.0030.00313.85
7.3.320.0000.00613.96
7.3.310.0040.00417.21
7.3.300.0000.00717.19
7.3.290.0030.00417.18
7.3.280.0110.00617.17
7.3.260.0140.00917.21
7.3.240.0090.00917.23
7.3.230.0060.01217.36
7.3.210.0140.00517.18
7.3.200.0060.01017.28
7.3.190.0070.01617.32
7.3.180.0060.01217.27
7.3.170.0140.00617.11
7.3.160.0100.00717.25
7.3.130.0100.00615.64
7.3.120.0090.00615.41
7.3.110.0040.01415.56
7.3.100.0040.00815.34
7.3.90.0060.00915.63
7.3.80.0040.01115.55
7.3.70.0040.00715.52
7.3.60.0070.00415.75
7.3.50.0070.00715.49
7.3.40.0060.00615.57
7.3.30.0060.00315.58
7.3.20.0650.00416.03
7.3.10.0270.00716.39
7.3.00.0180.00516.35
7.2.330.0090.01117.46
7.2.320.0160.00617.44
7.2.310.0100.01317.43
7.2.300.0090.00917.47
7.2.290.0060.01517.45
7.2.260.0140.00715.47
7.2.250.0040.01515.77
7.2.240.0070.01015.60
7.2.230.0070.00715.61
7.2.220.0000.01115.83
7.2.210.0120.00315.76
7.2.200.0060.00615.88
7.2.190.0030.01015.40
7.2.180.0000.01215.60
7.2.170.0000.01615.81
7.2.160.0100.00715.79
7.2.150.0240.00816.73
7.2.140.0130.00716.75
7.2.130.0050.01016.82
7.2.120.0110.01416.63
7.2.110.0060.01516.64
7.2.100.0700.01216.76
7.2.90.0150.00516.51
7.2.80.0150.00916.56
7.2.70.0100.00716.71
7.2.60.0610.00516.67
7.2.50.0120.00916.85
7.2.40.0690.00516.39
7.2.30.0550.00816.70
7.2.20.0630.01016.77
7.2.10.0110.00916.87
7.2.00.0130.01016.75
7.1.330.0030.01316.48
7.1.320.0070.00316.64
7.1.310.0090.00616.44
7.1.300.0060.00616.33
7.1.290.0090.00316.34
7.1.280.0070.00716.06
7.1.270.0040.00816.25
7.1.260.0030.01016.51
7.1.250.0260.00915.47
7.1.240.0070.01016.42
7.1.230.0030.01116.46
7.1.220.0000.01116.10
7.1.210.0060.00916.43
7.1.200.0040.01416.53
7.1.190.0000.01416.32
7.1.180.0080.00616.22
7.1.170.0090.00316.41
7.1.160.0110.00316.32
7.1.150.0000.00916.02
7.1.140.0000.01016.26
7.1.130.0070.00716.56
7.1.120.0040.00416.48
7.1.110.0060.00916.37
7.1.100.0090.00616.27
7.1.90.0040.01116.47
7.1.80.0070.01016.47
7.1.70.0070.01016.20
7.1.60.0140.00416.57
7.1.50.0080.00816.36
7.1.40.0060.01216.36
7.1.30.0100.00616.35
7.1.20.0000.01416.15
7.1.10.0060.00916.34
7.1.00.0030.01016.37

preferences:
38.79 ms | 403 KiB | 5 Q