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 'l1: ', iterator_count(new LimitIterator($iterator, 2)), ' ', iterator_count(new LimitIterator($tmpCsvFile, 2)), "\n"; echo 'l2: ', 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.0070.00718.31
8.3.50.0120.00722.82
8.3.40.0080.01118.52
8.3.30.0110.00419.00
8.3.20.0040.00420.16
8.3.10.0150.00023.61
8.3.00.0000.00819.38
8.2.180.0080.01116.32
8.2.170.0120.00622.96
8.2.160.0060.00920.37
8.2.150.0100.01024.18
8.2.140.0100.01024.66
8.2.130.0080.00026.16
8.2.120.0040.00421.10
8.2.110.0040.00420.38
8.2.100.0070.00419.76
8.2.90.0000.00819.22
8.2.80.0030.00517.97
8.2.70.0050.00317.63
8.2.60.0080.00017.80
8.2.50.0050.00518.07
8.2.40.0000.00718.16
8.2.30.0000.00717.93
8.2.20.0000.00817.74
8.2.10.0000.00718.10
8.2.00.0000.00717.79
8.1.280.0120.00625.92
8.1.270.0090.00023.79
8.1.260.0050.00326.35
8.1.250.0110.00428.09
8.1.240.0030.00621.80
8.1.230.0040.00718.97
8.1.220.0000.00717.74
8.1.210.0080.00018.77
8.1.200.0030.00817.21
8.1.190.0060.00317.38
8.1.180.0090.00018.10
8.1.170.0050.00318.64
8.1.160.0050.00321.94
8.1.150.0080.00018.83
8.1.140.0040.00417.39
8.1.130.0070.00017.87
8.1.120.0030.00517.47
8.1.110.0050.00317.46
8.1.100.0090.00017.42
8.1.90.0000.00817.43
8.1.80.0000.00717.38
8.1.70.0030.00317.45
8.1.60.0080.00017.60
8.1.50.0000.00817.57
8.1.40.0000.00817.53
8.1.30.0060.00317.51
8.1.20.0040.00417.64
8.1.10.0040.00417.58
8.1.00.0040.00417.57
8.0.300.0040.00418.77
8.0.290.0080.00016.75
8.0.280.0100.00018.36
8.0.270.0000.00817.16
8.0.260.0000.00717.16
8.0.250.0030.00317.04
8.0.240.0050.00316.89
8.0.230.0040.00416.85
8.0.220.0020.00516.90
8.0.210.0000.00716.87
8.0.200.0020.00517.00
8.0.190.0040.00416.91
8.0.180.0070.00016.95
8.0.170.0080.00017.02
8.0.160.0000.00717.02
8.0.150.0000.00716.91
8.0.140.0000.00716.80
8.0.130.0000.00613.35
8.0.120.0000.00816.96
8.0.110.0050.00216.96
8.0.100.0040.00417.06
8.0.90.0020.00516.95
8.0.80.0060.01016.95
8.0.70.0040.00417.07
8.0.60.0040.00416.86
8.0.50.0080.00016.98
8.0.30.0090.01017.16
8.0.20.0100.00817.40
8.0.10.0030.00717.04
8.0.00.0120.00616.89
7.4.330.0050.00015.00
7.4.320.0000.00616.62
7.4.300.0030.00316.60
7.4.290.0000.00716.60
7.4.280.0040.00416.50
7.4.270.0080.00316.54
7.4.260.0030.00316.58
7.4.250.0000.00816.49
7.4.240.0060.00216.57
7.4.230.0070.00016.49
7.4.220.0100.00716.55
7.4.210.0070.00716.52
7.4.200.0000.00716.63
7.4.160.0040.01216.33
7.4.150.0120.00617.40
7.4.140.0150.00317.86
7.4.130.0090.00816.49
7.4.120.0080.01216.53
7.4.110.0060.01116.61
7.4.100.0090.00816.50
7.4.90.0100.00616.45
7.4.80.0130.00319.39
7.4.70.0080.00816.58
7.4.60.0080.00816.47
7.4.50.0050.00316.53
7.4.40.0060.01116.43
7.4.30.0130.00316.60
7.4.00.0040.01115.04
7.3.330.0000.00613.24
7.3.320.0030.00313.17
7.3.310.0030.00316.21
7.3.300.0000.00716.32
7.3.290.0000.01416.30
7.3.280.0140.00316.29
7.3.270.0070.01017.40
7.3.260.0150.00316.32
7.3.250.0100.00616.43
7.3.240.0160.00016.35
7.3.230.0160.00016.48
7.3.210.0160.00016.54
7.3.200.0060.01019.39
7.3.190.0180.00416.29
7.3.180.0060.01016.34
7.3.170.0130.00316.46
7.3.160.0030.01316.26
7.2.330.0120.00616.71
7.2.320.0030.01316.79
7.2.310.0040.01816.44
7.2.300.0070.01016.57
7.2.290.0120.00416.74
7.2.60.0210.00416.89
7.2.00.0060.00619.59
7.1.200.0120.00315.68
7.1.100.0050.00817.63
7.1.70.0030.00617.20
7.1.60.0030.00917.18
7.1.50.0060.00616.76
7.1.00.0000.09722.32
7.0.200.0070.00716.82
7.0.140.0000.07722.08
7.0.60.0070.08720.02
7.0.50.0000.04717.85
7.0.40.0070.04020.10
7.0.30.0570.07720.30
7.0.20.0330.04720.19
7.0.10.0270.04320.09
7.0.00.0070.04720.19
5.6.280.0070.06721.13
5.6.210.0100.03320.47
5.6.200.0100.05018.18
5.6.190.0000.09020.60
5.6.180.0330.07320.50
5.6.170.0300.06720.57
5.6.160.0330.06020.51
5.6.150.0000.04718.27
5.6.140.0130.04018.18
5.6.130.0170.06318.28
5.6.120.0030.04021.05
5.6.110.0100.08021.08
5.6.100.0100.04021.05
5.6.90.0070.06721.00
5.6.80.0070.06320.39
5.6.70.0270.06720.53
5.5.350.0170.08020.38
5.5.340.0000.08317.99
5.5.330.0200.07720.40
5.5.320.0330.07720.30
5.5.310.0170.08320.27
5.5.300.0100.06718.07
5.5.290.0000.07318.08
5.5.280.0130.08020.88
5.5.270.0070.03720.88
5.5.260.0030.04020.84
5.5.250.0130.07320.58
5.5.240.0100.07020.24
5.4.450.0270.06319.32
5.4.440.0230.04019.41
5.4.430.0230.07019.47
5.4.420.0170.04319.20
5.4.410.0200.04019.38
5.4.400.0230.03319.15
5.4.390.0170.07719.13
5.4.380.0230.05018.85
5.4.370.0170.07019.08
5.4.360.0270.05719.16
5.4.350.0230.06319.07
5.4.340.0230.07019.09
5.4.320.0230.06019.23
5.4.310.0170.06018.95
5.4.300.0270.07019.31
5.4.290.0200.07018.99
5.4.280.0300.05719.08
5.4.270.0270.07319.09
5.4.260.0200.06319.13
5.4.250.0200.07719.23
5.4.240.0370.06319.07
5.4.230.0300.06718.96
5.4.220.0370.06019.14
5.4.210.0400.04018.85
5.4.200.0170.04318.93
5.4.190.0230.07319.05
5.4.180.0300.04719.14
5.4.170.0330.06318.96
5.4.160.0200.06018.84
5.4.150.0230.07018.83
5.4.140.0170.08016.51
5.4.130.0200.07716.30
5.4.120.0270.06316.66
5.4.110.0170.04316.62
5.4.100.0300.06716.57
5.4.90.0300.06316.46
5.4.80.0270.07016.17
5.4.70.0300.06716.16
5.4.60.0230.06016.43
5.4.50.0300.06016.16
5.4.40.0230.03316.32
5.4.30.0130.05016.24
5.4.20.0270.05316.50
5.4.10.0270.06716.43
5.4.00.0230.04315.83
5.3.290.0300.03714.65
5.3.280.0270.05714.50
5.3.270.0270.03314.78
5.3.260.0300.03714.61
5.3.250.0330.06014.57
5.3.240.0370.06014.51
5.3.230.0170.07714.59
5.3.220.0230.05014.48
5.3.210.0330.05714.54
5.3.200.0230.07314.65
5.3.190.0170.07714.65
5.3.180.0300.06314.72
5.3.170.0230.08014.65
5.3.160.0230.07014.55
5.3.150.0200.07314.46
5.3.140.0270.06014.56
5.3.130.0100.04714.66
5.3.120.0200.07314.70
5.3.110.0230.05014.46
5.3.100.0270.07014.04
5.3.90.0170.05314.14
5.3.80.0200.03714.10
5.3.70.0130.04314.24
5.3.60.0200.06713.93
5.3.50.0200.06313.86
5.3.40.0270.04713.92
5.3.30.0200.04713.83
5.3.20.0230.07313.69
5.3.10.0330.05713.60
5.3.00.0230.05713.73
5.2.170.0130.06712.70
5.2.160.0170.05712.70
5.2.150.0170.06012.70
5.2.140.0170.06312.70
5.2.130.0130.03012.70
5.2.120.0130.03012.70
5.2.110.0170.04312.70
5.2.100.0230.03712.70
5.2.90.0270.03012.70
5.2.80.0200.04712.70
5.2.70.0170.03712.70
5.2.60.0200.03712.70
5.2.50.0200.06012.70
5.2.40.0200.03712.70
5.2.30.0170.03712.70
5.2.20.0200.03312.70
5.2.10.0170.06012.70
5.2.00.0200.05312.70
5.1.60.0170.05312.70
5.1.50.0200.03012.70
5.1.40.0170.03712.70
5.1.30.0100.03312.70
5.1.20.0100.03012.70
5.1.10.0130.04712.70
5.1.00.0300.04012.70
5.0.50.0030.04312.70
5.0.40.0130.03712.70
5.0.30.0100.06012.70
5.0.20.0070.04312.70
5.0.10.0130.03312.70
5.0.00.0200.05312.70
4.4.90.0170.02712.70
4.4.80.0100.01712.70
4.4.70.0070.04012.70
4.4.60.0070.03012.70
4.4.50.0070.02712.70
4.4.40.0070.05312.70
4.4.30.0100.03312.70
4.4.20.0100.03312.70
4.4.10.0070.03712.70
4.4.00.0070.05712.70
4.3.110.0100.03012.70
4.3.100.0100.03312.70
4.3.90.0100.03312.70
4.3.80.0070.04312.70
4.3.70.0100.03312.70
4.3.60.0100.02312.70
4.3.50.0070.03712.70
4.3.40.0070.04312.70
4.3.30.0100.01712.70
4.3.20.0030.03712.70
4.3.10.0070.02312.70
4.3.00.0070.02012.70

preferences:
39.9 ms | 401 KiB | 5 Q