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' => 5, '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.0120.00517.42
8.5.00.0120.01120.97
8.4.160.0140.01024.78
8.4.150.0020.00014.05
8.4.140.0120.01018.28
8.4.130.0140.00719.64
8.4.120.0110.01024.80
8.4.110.0150.00524.72
8.4.100.0070.01019.52
8.4.90.0100.01321.44
8.4.80.0110.01119.53
8.4.70.0080.00319.74
8.4.60.0080.01119.59
8.4.50.0110.00819.36
8.4.40.0060.01120.19
8.4.30.0130.00623.23
8.4.20.0140.00719.51
8.4.10.0060.00320.26
8.3.290.0110.01021.66
8.3.280.0110.01019.40
8.3.270.0120.00817.57
8.3.260.0030.00717.27
8.3.250.0080.00919.62
8.3.240.0140.00618.05
8.3.230.0090.00917.36
8.3.220.0120.00819.86
8.3.210.0120.00717.68
8.3.200.0030.00717.57
8.3.190.0080.01218.20
8.3.180.0100.00919.95
8.3.170.0090.00917.50
8.3.160.0160.00618.04
8.3.150.0060.00317.54
8.3.140.0090.00021.61
8.3.130.0100.00019.38
8.3.120.0110.00819.74
8.3.110.0060.01220.94
8.3.100.0090.01224.06
8.3.90.0060.00326.77
8.3.80.0080.00417.97
8.3.70.0100.01317.38
8.3.60.0070.01019.31
8.3.50.0070.00618.57
8.3.40.0030.01319.87
8.3.30.0120.00319.63
8.3.20.0040.00421.66
8.3.10.0070.00321.40
8.3.00.0030.00623.21
8.2.300.0120.00823.07
8.2.290.0060.00221.22
8.2.280.0100.01019.24
8.2.270.0100.01017.52
8.2.260.0040.01117.44
8.2.250.0090.00617.60
8.2.240.0080.00017.80
8.2.230.0070.01322.58
8.2.220.0040.00437.54
8.2.210.0060.00626.77
8.2.200.0000.01019.29
8.2.190.0090.00619.26
8.2.180.0090.01219.42
8.2.170.0120.00322.96
8.2.160.0130.00321.12
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0060.00620.04
8.2.120.0000.00826.35
8.2.110.0030.00721.39
8.2.100.0060.00918.59
8.2.90.0000.00918.83
8.2.80.0030.00918.80
8.2.70.0000.01118.50
8.2.60.0100.00018.50
8.2.50.0050.00318.63
8.2.40.0030.00622.03
8.2.30.0000.00820.09
8.2.20.0030.00618.94
8.2.10.0060.00620.00
8.2.00.0040.00418.84
8.1.330.0110.00822.69
8.1.320.0120.00817.27
8.1.310.0050.00317.06
8.1.300.0040.00416.93
8.1.290.0050.00530.84
8.1.280.0070.01425.92
8.1.270.0030.00519.92
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00324.49
8.1.230.0080.00424.61
8.1.220.0030.00518.66
8.1.210.0080.00019.71
8.1.200.0000.00818.00
8.1.190.0030.00618.10
8.1.180.0100.00018.41
8.1.170.0030.00719.53
8.1.160.0000.00819.83
8.1.150.0030.00519.64
8.1.140.0000.00721.11
8.1.130.0050.00521.18
8.1.120.0030.00518.35
8.1.110.0030.00618.28
8.1.100.0040.00418.31
8.1.90.0030.00518.25
8.1.80.0000.00818.25
8.1.70.0030.00518.29
8.1.60.0030.00618.47
8.1.50.0030.00718.38
8.1.40.0030.00618.39
8.1.30.0040.00418.43
8.1.20.0030.00618.47
8.1.10.0000.00918.50
8.1.00.0080.00018.44
8.0.300.0000.00720.70
8.0.290.0000.00817.88
8.0.280.0040.00419.20
8.0.270.0000.00718.05
8.0.260.0000.01019.36
8.0.250.0040.00417.94
8.0.240.0070.00017.85
8.0.230.0050.00317.96
8.0.220.0060.00317.85
8.0.210.0060.00317.77
8.0.200.0040.00417.95
8.0.190.0030.00617.73
8.0.180.0030.00617.83
8.0.170.0040.00817.88
8.0.160.0030.00617.73
8.0.150.0040.00417.73
8.0.140.0070.00017.75
8.0.130.0030.00314.24
8.0.120.0000.00917.79
8.0.110.0000.00817.82
8.0.100.0040.00417.77
8.0.90.0030.00517.86
8.0.80.0030.01317.90
8.0.70.0030.00517.72
8.0.60.0030.00517.68
8.0.50.0000.00817.86
8.0.30.0090.00817.91
8.0.20.0170.00318.17
8.0.10.0040.00417.88
8.0.00.0140.01017.52
7.4.330.0030.00315.55
7.4.320.0000.00617.38
7.4.300.0030.00317.48
7.4.290.0040.00417.42
7.4.280.0000.00817.39
7.4.270.0060.00617.23
7.4.260.0050.00217.36
7.4.250.0070.00017.28
7.4.240.0040.00417.41
7.4.230.0040.00417.22
7.4.220.0030.00517.50
7.4.210.0060.01117.40
7.4.200.0020.00517.21
7.4.160.0120.00717.39
7.4.140.0010.01617.86
7.4.130.0190.00017.58
7.4.120.0080.01117.37
7.4.110.0110.00717.23
7.4.100.0110.01217.32
7.4.90.0120.00717.59
7.4.80.0130.00619.39
7.4.70.0060.01217.49
7.4.60.0180.00317.37
7.4.50.0100.00317.56
7.4.40.0150.00917.11
7.4.10.0150.00415.77
7.4.00.0050.01315.74
7.3.330.0030.00314.07
7.3.320.0050.00013.91
7.3.310.0040.00417.02
7.3.300.0070.00017.17
7.3.290.0040.00417.21
7.3.280.0090.00817.19
7.3.260.0080.01317.30
7.3.240.0140.00617.26
7.3.230.0140.00717.11
7.3.210.0130.00617.08
7.3.200.0100.00717.12
7.3.190.0100.01417.17
7.3.180.0140.00717.23
7.3.170.0140.01017.24
7.3.160.0060.01517.32
7.3.130.0070.01315.77
7.3.120.0030.01615.35
7.3.110.0130.00715.64
7.3.100.0060.00915.50
7.3.90.0060.00615.77
7.3.80.0070.01015.50
7.3.70.0040.00815.55
7.3.60.0030.00715.39
7.3.50.0070.01115.63
7.3.40.0000.01515.41
7.3.30.0000.00915.45
7.3.20.3160.00615.76
7.3.10.2040.00915.87
7.3.00.4210.00715.83
7.2.330.0070.01417.52
7.2.320.0190.00617.50
7.2.310.0140.01017.52
7.2.300.0060.01317.37
7.2.290.0080.01217.41
7.2.260.0090.00915.98
7.2.250.0150.00415.73
7.2.240.0080.00615.68
7.2.230.0060.01515.87
7.2.220.0100.00615.70
7.2.210.0070.01115.83
7.2.200.0080.00415.96
7.2.190.0130.00315.84
7.2.180.0000.01615.76
7.2.170.0090.00615.68
7.2.160.0040.01215.83
7.2.150.2740.00616.13
7.2.140.2050.00916.12
7.2.130.4040.00616.12
7.2.120.3590.00816.11
7.2.110.1390.01116.13
7.2.100.0670.01216.14
7.2.90.0820.00916.09
7.2.80.2540.00616.14
7.2.70.2180.00916.13
7.2.60.3840.00716.00
7.2.50.2010.00816.14
7.2.40.1720.00916.10
7.2.30.1680.01016.14
7.2.20.1830.01116.00
7.2.10.1230.00715.98
7.2.00.2270.00816.20
7.1.330.0030.00716.24
7.1.320.0070.01316.29
7.1.310.0030.01016.46
7.1.300.0090.00916.21
7.1.290.0070.00716.60
7.1.280.0040.00816.48
7.1.270.0070.00316.33
7.1.260.0120.00316.28
7.1.250.3750.00614.75
7.1.240.0080.00416.09
7.1.230.0000.01116.29
7.1.220.0130.00016.24
7.1.210.0030.01016.16
7.1.200.0040.00816.49
7.1.190.0120.00316.32
7.1.180.0100.00616.33
7.1.170.0160.00016.04
7.1.160.0090.00616.23
7.1.150.0070.00716.52
7.1.140.0080.00616.42
7.1.130.0060.01016.27
7.1.120.0120.00016.30
7.1.110.0090.00616.32
7.1.100.0030.00916.56
7.1.90.0030.01016.27
7.1.80.0130.00316.11
7.1.70.0040.01116.32
7.1.60.0030.01216.47
7.1.50.0060.00616.28
7.1.40.0060.00316.21
7.1.30.0040.01216.51
7.1.20.0000.01116.46
7.1.10.0040.01216.48
7.1.00.0000.01016.15

preferences:
105.77 ms | 403 KiB | 5 Q