3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = <<<'EOF' Line 1 Line 2 Line 3 Line 4 EOF; $tmpCsvFile = new SplTempFileObject(); $tmpCsvFile->fwrite($content); $iterator = new CallbackFilterIterator($tmpCsvFile, function ($row) { return true; }); echo 'Limit 2: ', iterator_count(new LimitIterator($iterator, 2)), ' ', iterator_count(new LimitIterator($tmpCsvFile, 2)), "\n"; echo 'Limit 3: ', iterator_count(new LimitIterator($iterator, 3)), ' ', iterator_count(new LimitIterator($tmpCsvFile, 3)), "\n";

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.0090.00918.18
8.3.50.0100.01022.82
8.3.40.0160.00318.78
8.3.30.0140.00319.14
8.3.20.0080.00020.29
8.3.10.0040.00423.66
8.3.00.0000.00819.38
8.2.180.0130.00916.50
8.2.170.0090.00922.96
8.2.160.0150.00420.22
8.2.150.0120.00324.18
8.2.140.0040.00424.66
8.2.130.0100.00326.16
8.2.120.0000.00821.01
8.2.110.0100.00722.11
8.2.100.0070.00417.72
8.2.90.0000.00819.25
8.2.80.0030.00618.66
8.2.70.0060.00317.50
8.2.60.0040.00417.90
8.2.50.0050.00318.07
8.2.40.0080.00018.02
8.2.30.0000.00717.99
8.2.20.0020.00517.57
8.2.10.0000.00718.06
8.2.00.0060.00317.76
8.1.280.0070.01025.92
8.1.270.0040.00423.99
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0030.00723.84
8.1.230.0060.00618.95
8.1.220.0040.00417.74
8.1.210.0090.00018.77
8.1.200.0060.00317.38
8.1.190.0060.00317.36
8.1.180.0050.00318.10
8.1.170.0030.00618.55
8.1.160.0000.00718.91
8.1.150.0040.00418.86
8.1.140.0050.00217.57
8.1.130.0000.00717.46
8.1.120.0000.00817.46
8.1.110.0040.00417.52
8.1.100.0000.00917.29
8.1.90.0040.00417.41
8.1.80.0030.00317.38
8.1.70.0070.00017.46
8.1.60.0040.00417.54
8.1.50.0080.00017.44
8.1.40.0000.00717.48
8.1.30.0030.00517.63
8.1.20.0030.00617.63
8.1.10.0050.00217.58
8.1.00.0000.00817.54
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0000.00718.49
8.0.270.0030.00317.18
8.0.260.0000.00616.89
8.0.250.0070.00016.96
8.0.240.0060.00316.91
8.0.230.0000.00717.00
8.0.220.0030.00316.82
8.0.210.0030.00316.89
8.0.200.0030.00316.98
8.0.190.0030.00316.92
8.0.180.0050.00216.87
8.0.170.0000.00816.89
8.0.160.0000.00716.91
8.0.150.0070.00016.87
8.0.140.0050.00216.79
8.0.130.0000.00513.42
8.0.120.0000.00716.92
8.0.110.0040.00417.02
8.0.100.0000.00916.73
8.0.90.0070.00017.01
8.0.80.0110.00516.94
8.0.70.0040.00416.96
8.0.60.0000.00716.88
8.0.50.0040.00416.85
8.0.30.0110.00817.07
8.0.20.0080.01017.43
8.0.10.0000.00816.97
8.0.00.0060.01216.71
7.4.330.0030.00315.15
7.4.320.0030.00316.49
7.4.300.0000.00616.51
7.4.290.0000.00716.37
7.4.280.0040.00416.59
7.4.270.0030.00616.56
7.4.260.0000.00716.48
7.4.250.0040.00416.55
7.4.240.0040.00416.62
7.4.230.0030.00316.58
7.4.220.0070.01016.63
7.4.210.0060.00816.55
7.4.200.0040.00416.30
7.4.160.0130.00316.56
7.4.150.0160.00017.40
7.4.140.0070.01117.86
7.4.130.0120.00516.60
7.4.120.0080.01216.52
7.4.110.0100.00716.60
7.4.100.0030.01416.55
7.4.90.0090.00916.41
7.4.80.0090.01219.39
7.4.70.0060.00916.70
7.4.60.0040.01316.66
7.4.50.0000.00816.44
7.4.40.0140.00716.47
7.4.30.0080.00816.38
7.4.00.0100.00015.16
7.3.330.0060.00013.23
7.3.320.0070.00013.28
7.3.310.0000.00716.34
7.3.300.0000.00716.18
7.3.290.0120.00616.36
7.3.280.0100.00716.29
7.3.270.0150.00917.40
7.3.260.0140.00416.37
7.3.250.0070.01016.52
7.3.240.0110.00716.35
7.3.230.0060.01216.45
7.3.210.0090.00916.46
7.3.200.0130.00319.39
7.3.190.0060.01516.24
7.3.180.0120.00316.30
7.3.170.0130.00316.38
7.3.160.0080.01216.39
7.2.330.0090.00916.46
7.2.320.0150.00316.80
7.2.310.0190.00016.74
7.2.300.0100.01416.65
7.2.290.0070.01016.48
7.2.60.0030.01016.68
7.2.00.0060.00919.07
7.1.200.0000.00715.75
7.1.100.0030.01018.04
7.1.70.0070.00017.28
7.1.60.0030.02119.46
7.1.50.0040.01816.62
7.1.00.0000.08022.31
7.0.200.0030.01016.44
7.0.140.0070.07022.07
7.0.60.0200.06719.85
7.0.50.0070.03717.89
7.0.40.0070.04019.98
7.0.30.0200.04720.10
7.0.20.0300.05720.08
7.0.10.0030.09320.26
7.0.00.0030.08720.19
5.6.280.0030.07020.86
5.6.210.0100.07720.49
5.6.200.0030.05018.21
5.6.190.0100.08720.42
5.6.180.0200.04320.77
5.6.170.0270.04020.54
5.6.160.0170.08020.50
5.6.150.0030.07018.23
5.6.140.0000.07718.15
5.6.130.0070.08718.30
5.6.120.0130.05021.01
5.6.110.0070.07721.09
5.6.100.0100.06320.98
5.6.90.0100.08020.97
5.6.80.0070.05320.51
5.6.70.4230.03720.32
5.5.350.0300.04320.32
5.5.340.0070.04718.03
5.5.330.0070.08720.37
5.5.320.0230.05020.27
5.5.310.0230.07020.39
5.5.300.0070.07018.08
5.5.290.0170.07317.95
5.5.280.0030.08320.77
5.5.270.0030.04320.78
5.5.260.0070.07320.87
5.5.250.0070.03720.61
5.5.240.0270.07320.26
5.4.450.3400.04019.55
5.4.440.3430.03319.57
5.4.430.3800.03319.38
5.4.420.3700.04019.56
5.4.410.3930.04719.39
5.4.400.3370.03719.32
5.4.390.3370.03318.88
5.4.380.3770.03718.85
5.4.370.3770.03719.14
5.4.360.3800.03318.85
5.4.350.3800.03019.20
5.4.340.4100.03319.26
5.4.320.3170.04019.32
5.4.310.3900.03319.06
5.4.300.1300.04019.24
5.4.290.0100.03718.89
5.4.280.0430.05018.99
5.4.270.4430.04318.87
5.4.260.3670.04019.24
5.4.250.3630.03318.94
5.4.240.3570.03319.23
5.4.230.3700.03719.00
5.4.220.3670.04019.24
5.4.210.3430.04019.05
5.4.200.3800.03719.08
5.4.190.3900.02719.19
5.4.180.0100.07019.08
5.4.170.4500.03719.14
5.4.160.4100.04018.85
5.4.150.4070.03719.07
5.4.140.3530.03316.38
5.4.130.4000.03716.38
5.4.120.3630.03316.66
5.4.110.3830.04316.51
5.4.100.3600.04016.42
5.4.90.3830.03016.27
5.4.80.4200.02716.36
5.4.70.4130.03316.50
5.4.60.4370.04016.43
5.4.50.4100.03316.54
5.4.40.3830.03316.43
5.4.30.3470.03716.16
5.4.20.3900.03316.50
5.4.10.3430.03716.35
5.4.00.2570.04316.16
5.3.290.3930.03714.64
5.3.280.3530.04014.59
5.3.270.2370.05714.60
5.3.260.3770.04014.51
5.3.250.3470.03014.72
5.3.240.3970.05014.61
5.3.230.3730.03714.61
5.3.220.4100.04014.48
5.3.210.4770.02714.56
5.3.200.3900.03314.50
5.3.190.3530.03314.70
5.3.180.3530.03314.66
5.3.170.3930.03014.55
5.3.160.4100.03714.73
5.3.150.4430.03314.52
5.3.140.3730.03314.78
5.3.130.3870.03014.55
5.3.120.3830.03314.52
5.3.110.3670.04014.55
5.3.100.2670.03314.01
5.3.90.3600.03314.24
5.3.80.3730.04014.11
5.3.70.3570.03714.02
5.3.60.3570.03714.02
5.3.50.3600.03714.11
5.3.40.3570.03313.88
5.3.30.3630.03313.82
5.3.20.3630.03013.62
5.3.10.4170.03313.74
5.3.00.3830.03313.66
5.2.170.2900.03310.98
5.2.160.2900.03710.98
5.2.150.3130.03011.20
5.2.140.2670.02711.06
5.2.130.3270.02011.01
5.2.120.2970.03011.11
5.2.110.3030.03011.19
5.2.100.3130.03010.94
5.2.90.2930.03311.04
5.2.80.3570.02310.93
5.2.70.3270.02310.95
5.2.60.2700.02310.91
5.2.50.2630.03010.91
5.2.40.2630.02711.03
5.2.30.2400.03011.02
5.2.20.2900.03310.91
5.2.10.2430.03310.94
5.2.00.2670.03010.94
5.1.60.2470.02710.95
5.1.50.2670.02710.95
5.1.40.2300.02710.95
5.1.30.2400.03310.95
5.1.20.2330.02310.95
5.1.10.2570.02710.95
5.1.00.2670.02710.95
5.0.50.1530.02310.95
5.0.40.1770.02010.95
5.0.30.1700.02710.95
5.0.20.1400.02010.95
5.0.10.1630.0239.99
5.0.00.1500.0339.99
4.4.90.1270.01710.91
4.4.80.1430.01310.91
4.4.70.1400.01710.92
4.4.60.1230.01310.93
4.4.50.1400.01710.94
4.4.40.1630.01310.95
4.4.30.1400.02310.95
4.4.20.1170.01310.95
4.4.10.1300.02010.95
4.4.00.1900.02010.95
4.3.110.1800.01310.95
4.3.100.1430.01710.95
4.3.90.1670.0179.99
4.3.80.1670.0239.99
4.3.70.1930.0179.99
4.3.60.1430.0139.99
4.3.50.1400.0139.99
4.3.40.1730.0279.99
4.3.30.1000.0139.99
4.3.20.0970.0179.99
4.3.10.0770.0139.99
4.3.00.0900.0209.99

preferences:
43.26 ms | 401 KiB | 5 Q