3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dbh = new \PDO('sqlite:'); $dbh->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION ); $goodSql = 'SELECT number FROM (SELECT 1 number UNION SELECT 2) numbers WHERE number not in (2)'; echo json_encode($dbh->query($goodSql)->fetchAll(PDO::FETCH_NUM)); $badSql = 'SELECT number FROM (SELECT 1 number UNION SELECT 2) numbers WHERE number not in (?)'; $binds = ['2']; $statement = $dbh->prepare($badSql); $statement->execute($binds); echo json_encode($statement->fetchAll(PDO::FETCH_NUM));

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.00.0120.00920.92
8.4.150.0010.00114.05
8.4.140.0160.00518.28
8.4.130.0120.00819.53
8.4.120.0120.00825.11
8.4.110.0140.00823.29
8.4.100.0120.00919.45
8.4.90.0120.00919.74
8.4.80.0150.00521.64
8.4.70.0110.00918.96
8.4.60.0120.01021.56
8.4.50.0060.00322.09
8.4.40.0100.01020.16
8.4.30.0130.00619.95
8.4.20.0040.01218.56
8.4.10.0120.00820.20
8.3.280.0070.01619.27
8.3.270.0150.00617.43
8.3.260.0090.00917.38
8.3.250.0120.00819.58
8.3.240.0120.00719.72
8.3.230.0090.01117.36
8.3.220.0050.00319.85
8.3.210.0070.00417.51
8.3.200.0060.00317.57
8.3.190.0070.00819.51
8.3.180.0080.01117.71
8.3.170.0150.00317.95
8.3.160.0030.00917.34
8.3.150.0100.01317.86
8.3.140.0100.01017.35
8.3.130.0000.00919.25
8.3.120.0180.00321.70
8.3.110.0130.00317.54
8.3.100.0090.00017.53
8.3.90.0060.00326.77
8.3.80.0070.00319.36
8.3.70.0110.01117.38
8.3.60.0100.01018.92
8.3.50.0130.01117.23
8.3.40.0110.00419.71
8.3.30.0090.00619.54
8.3.20.0080.00020.97
8.3.10.0040.00422.68
8.3.00.0080.00021.43
8.2.290.0130.00721.07
8.2.280.0110.00919.38
8.2.270.0100.01019.07
8.2.260.0140.00419.52
8.2.250.0050.00317.75
8.2.240.0080.00018.32
8.2.230.0090.00020.94
8.2.220.0060.00337.54
8.2.210.0040.00426.77
8.2.200.0090.00018.88
8.2.190.0120.00619.14
8.2.180.0070.00719.31
8.2.170.0040.01119.91
8.2.160.0130.00322.96
8.2.150.0050.00325.66
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0000.00921.80
8.2.110.0060.00323.15
8.2.100.0100.00318.78
8.2.90.0030.00520.09
8.2.80.0090.00018.50
8.2.70.0030.00618.50
8.2.60.0050.00318.50
8.2.50.0030.00618.36
8.2.40.0060.00318.50
8.2.30.0080.00020.11
8.2.20.0080.00018.96
8.2.10.0040.00419.00
8.2.00.0040.00418.99
8.1.330.0070.00222.71
8.1.320.0140.00617.05
8.1.310.0040.00417.46
8.1.300.0060.00319.41
8.1.290.0050.00530.84
8.1.280.0100.01025.92
8.1.270.0030.00622.68
8.1.260.0030.00526.35
8.1.250.0120.00328.09
8.1.240.0030.00619.88
8.1.230.0110.00018.70
8.1.220.0050.00318.66
8.1.210.0080.00018.77
8.1.200.0030.00718.10
8.1.190.0080.00018.10
8.1.180.0050.00518.10
8.1.170.0030.00619.29
8.1.160.0060.00319.73
8.1.150.0080.00020.96
8.1.140.0040.00420.33
8.1.130.0000.00718.35
8.1.120.0080.00018.32
8.1.110.0000.00718.34
8.1.100.0070.00018.29
8.1.90.0090.00318.32
8.1.80.0040.00418.18
8.1.70.0000.00718.26
8.1.60.0070.00318.35
8.1.50.0000.00818.39
8.1.40.0040.00418.44
8.1.30.0040.00418.59
8.1.20.0040.00418.55
8.1.10.0040.00418.50
8.1.00.0030.00618.46
8.0.300.0040.00419.59
8.0.290.0080.00017.63
8.0.280.0000.00719.40
8.0.270.0040.00417.75
8.0.260.0030.00317.64
8.0.250.0070.00017.89
8.0.240.0000.00717.93
8.0.230.0030.00617.82
8.0.220.0080.00017.81
8.0.210.0000.00817.66
8.0.200.0090.00017.84
8.0.190.0080.00317.78
8.0.180.0080.00017.66
8.0.170.0040.00417.74
8.0.160.0060.00317.76
8.0.150.0050.00317.70
8.0.140.0050.00217.74
8.0.130.0030.00314.14
8.0.120.0030.00617.64
8.0.110.0080.00017.73
8.0.100.0000.00717.60
8.0.90.0000.00717.65
8.0.80.0160.00317.65
8.0.70.0060.00317.53
8.0.60.0000.00817.80
8.0.50.0050.00217.82
8.0.30.0070.01317.88
8.0.20.0070.01317.86
8.0.10.0000.00717.92
8.0.00.0120.00617.56
7.4.330.0020.00415.86
7.4.320.0000.00617.22
7.4.300.0030.00317.39
7.4.290.0050.00517.22
7.4.280.0080.00017.49
7.4.270.0000.00717.29
7.4.260.0070.00014.07
7.4.250.0000.00817.24
7.4.240.0040.00417.31
7.4.230.0030.00317.31
7.4.220.0040.01417.30
7.4.210.0070.00717.50
7.4.200.0000.00717.20
7.4.160.0090.00817.20
7.4.150.0090.00917.40
7.4.140.0120.00917.86
7.4.130.0170.00317.25
7.4.120.0100.00917.26
7.4.110.0100.00717.29
7.4.100.0120.00617.38
7.4.90.0060.01217.27
7.4.80.0110.00819.39
7.4.70.0110.00517.37
7.4.60.0250.02217.37
7.4.50.0080.00917.18
7.4.40.0090.00917.26
7.4.30.0100.00617.20
7.4.00.0080.00815.74
7.3.330.0000.00613.74
7.3.320.0030.00313.73
7.3.310.0030.00316.96
7.3.300.0030.00317.06
7.3.290.0110.00817.05
7.3.280.0090.01017.01
7.3.270.0030.01617.40
7.3.260.0110.00617.13
7.3.250.0140.01017.16
7.3.240.0050.01317.13
7.3.230.0140.00716.92
7.3.210.0100.00717.39
7.3.200.0090.00916.99
7.3.190.0100.01017.35
7.3.180.0120.00617.05
7.3.170.0070.01017.16
7.3.160.0170.00017.05
7.2.330.0060.01217.45
7.2.320.0000.01817.32
7.2.310.0120.00917.39
7.2.300.0060.01017.30
7.2.290.0030.01317.35
7.2.60.0080.00817.66
7.2.50.0030.01217.52
7.1.200.0150.00016.65
7.1.70.0000.00918.04
7.1.60.0470.01734.29
7.1.50.0530.01333.91
7.1.40.0570.01333.41
7.1.30.0700.01733.50
7.1.20.0470.01733.73
7.1.10.0470.00715.66
7.1.00.0370.01715.71
7.0.200.0370.01015.98
7.0.190.0670.01015.66
7.0.180.0530.01315.39
7.0.170.0500.01015.39
7.0.160.0500.00315.33
7.0.150.0400.01315.29
7.0.140.0430.00715.33
7.0.130.0500.01015.55
7.0.120.0470.00715.47
7.0.110.0330.01715.13
7.0.100.0500.01015.45
7.0.90.0370.01015.20
7.0.80.0430.01315.15
7.0.70.0530.00714.95
7.0.60.0330.02015.01
7.0.50.0400.01015.09
7.0.40.0370.01315.51
7.0.30.0470.00015.17
7.0.20.0430.01015.15
7.0.10.0400.01015.27
7.0.00.0400.01014.98

preferences:
31.93 ms | 403 KiB | 5 Q