3v4l.org

run code in 300+ PHP versions simultaneously
<?php class IncrementIterator implements iterator { protected $start; protected $end; protected $current; public function __construct($start, $end) { $this->start = $start; $this->end = $end; } public function rewind() { $this->current = $this->start; } public function valid() { return $this->current <= $this->end; } public function key() { return $this->current; } public function current() { return $this->current; } public function next() { $this->current++; } } $aIterator = new IncrementIterator(0, 26); $bIterator = new IncrementIterator(0, 26); $cIterator = new IncrementIterator(0, 26); $dIterator = new IncrementIterator(0, 26); $multipleIterator = new MultipleIterator(); $multipleIterator->attachIterator($aIterator); $multipleIterator->attachIterator($bIterator); $multipleIterator->attachIterator($cIterator); $multipleIterator->attachIterator($dIterator); foreach ($multipleIterator as $current) { var_dump($current); }

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.01118.68
8.3.50.0120.00721.98
8.3.40.0090.00619.02
8.3.30.0030.01219.09
8.3.20.0080.00020.33
8.3.10.0030.00521.76
8.3.00.0080.00018.03
8.2.180.0090.00916.75
8.2.170.0070.01122.96
8.2.160.0150.00020.35
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00420.94
8.2.110.0060.00622.19
8.2.100.0080.00620.07
8.2.90.0030.00619.22
8.2.80.0060.00317.97
8.2.70.0000.00817.38
8.2.60.0030.00617.93
8.2.50.0090.00018.07
8.2.40.0040.00418.16
8.2.30.0070.00018.30
8.2.20.0080.00017.63
8.2.10.0060.00318.23
8.2.00.0000.00817.64
8.1.280.0090.00625.92
8.1.270.0050.00323.84
8.1.260.0030.00526.35
8.1.250.0070.00028.09
8.1.240.0090.00023.88
8.1.230.0090.00319.14
8.1.220.0000.00817.78
8.1.210.0040.00418.77
8.1.200.0090.00017.48
8.1.190.0080.00017.13
8.1.180.0030.00618.10
8.1.170.0030.00618.66
8.1.160.0030.00522.03
8.1.150.0000.00718.86
8.1.140.0000.00817.48
8.1.130.0040.00417.73
8.1.120.0060.00317.31
8.1.110.0030.00517.53
8.1.100.0060.00317.47
8.1.90.0020.00517.44
8.1.80.0000.00717.48
8.1.70.0030.00517.38
8.1.60.0000.00917.52
8.1.50.0040.00417.51
8.1.40.0000.00817.55
8.1.30.0000.00917.62
8.1.20.0040.00417.54
8.1.10.0030.00617.59
8.1.00.0000.00817.39
8.0.300.0050.00318.77
8.0.290.0040.00416.63
8.0.280.0070.00018.36
8.0.270.0000.00817.25
8.0.260.0070.00017.32
8.0.250.0040.00416.96
8.0.240.0040.00416.95
8.0.230.0000.00716.92
8.0.220.0000.00816.92
8.0.210.0070.00016.85
8.0.200.0000.00716.87
8.0.190.0000.00716.89
8.0.180.0070.00016.87
8.0.170.0040.00416.80
8.0.160.0040.00416.88
8.0.150.0070.00316.84
8.0.140.0050.00516.86
8.0.130.0030.00313.30
8.0.120.0060.00316.87
8.0.110.0030.00616.92
8.0.100.0000.00716.84
8.0.90.0050.00316.85
8.0.80.0040.01216.92
8.0.70.0000.00816.69
8.0.60.0080.00016.96
8.0.50.0050.00316.67
8.0.30.0180.00417.20
8.0.20.0150.01017.40
8.0.10.0040.00416.89
8.0.00.0070.01516.80
7.4.330.0000.00515.00
7.4.320.0080.00016.59
7.4.300.0030.00316.63
7.4.290.0000.00716.39
7.4.280.0040.00416.59
7.4.270.0000.00916.63
7.4.260.0000.00716.63
7.4.250.0080.00016.55
7.4.240.0050.00316.63
7.4.230.0070.00016.71
7.4.220.0150.01116.64
7.4.210.0060.01016.71
7.4.200.0080.00016.64
7.4.160.0090.00916.39
7.4.150.0070.01717.40
7.4.140.0120.00717.86
7.4.130.0110.00916.57
7.4.120.0140.00616.45
7.4.110.0120.00816.64
7.4.100.0120.00916.62
7.4.90.0080.01216.50
7.4.80.0110.01019.39
7.4.70.0130.00616.52
7.4.60.0150.00616.54
7.4.50.0060.00016.37
7.4.40.0110.00816.54
7.4.30.0120.00616.47
7.4.00.0040.01114.84
7.3.330.0030.00313.28
7.3.320.0000.00513.33
7.3.310.0070.00016.15
7.3.300.0000.00816.31
7.3.290.0070.01116.38
7.3.280.0100.00716.28
7.3.270.0060.01217.40
7.3.260.0070.01116.42
7.3.250.0080.01216.39
7.3.240.0040.02316.39
7.3.230.0030.01416.39
7.3.210.0090.01216.43
7.3.200.0100.01316.67
7.3.190.0150.01116.31
7.3.180.0060.01216.27
7.3.170.0110.00716.56
7.3.160.0180.00016.61
7.3.120.0060.00914.89
7.3.10.0110.00316.48
7.3.00.0030.01316.21
7.2.330.0100.01016.39
7.2.320.0140.00516.79
7.2.310.0060.01316.46
7.2.300.0120.00616.88
7.2.290.0100.01316.82
7.2.130.0040.01416.37
7.2.120.0100.00516.22
7.2.110.0090.01216.56
7.2.100.0130.00816.42
7.2.90.0060.01316.57
7.2.80.0130.00016.50
7.2.70.0180.00516.88
7.2.60.0080.01116.73
7.2.50.0140.00316.48
7.2.40.0030.01016.50
7.2.30.0030.01316.39
7.2.20.0110.00716.63
7.2.10.0150.00416.28
7.2.00.0040.00818.28
7.1.250.0100.01015.25
7.1.100.0070.00417.86
7.1.70.0030.00716.85
7.1.60.0090.01519.25
7.1.50.0030.02016.60
7.1.00.0030.07722.51
7.0.200.0050.00316.91
7.0.140.0000.07722.05
7.0.60.0070.08319.93
7.0.50.0070.08717.96
7.0.40.0070.08720.07
7.0.30.0300.04020.09
7.0.20.0300.07020.25
7.0.10.0070.08720.19
7.0.00.0100.05020.33
5.6.280.0070.07020.90
5.6.210.0030.04720.63
5.6.200.0100.07718.12
5.6.190.0030.04320.77
5.6.180.0230.04020.47
5.6.170.0300.07020.39
5.6.160.0030.08320.54
5.6.150.0200.07018.18
5.6.140.0000.04718.18
5.6.130.0070.08018.21
5.6.120.0070.09021.13
5.6.110.0070.08320.96
5.6.100.0070.04321.09
5.6.90.0070.07720.97
5.6.80.0030.03720.38
5.5.350.3830.04020.38
5.5.340.0100.03317.99
5.5.330.0030.08320.40
5.5.320.0300.08020.36
5.5.310.0100.07320.51
5.5.300.0030.08017.98
5.5.290.0000.09017.98
5.5.280.0100.07020.91
5.5.270.0070.08320.87
5.5.260.0070.05320.74
5.5.250.0030.08720.66
5.5.240.0130.07020.26
5.4.450.0300.04319.42
5.4.440.0400.05019.54
5.4.430.0600.04319.31
5.4.420.0300.04019.32
5.4.410.0230.04719.18
5.4.400.0630.03019.06
5.4.390.0200.04019.09
5.4.380.0130.06318.54
5.4.370.0130.05318.64
5.4.360.0070.05718.68
5.4.350.0170.05018.75
5.4.340.0200.05018.63
5.4.320.0050.03712.50
5.4.310.0100.03712.50
5.4.300.0080.03712.50
5.4.290.0060.04112.50
5.4.280.0070.03512.40
5.4.270.0070.03712.40
5.4.260.0030.04212.40
5.4.250.0060.03812.40
5.4.240.0060.03712.40
5.4.230.0050.04012.39
5.4.220.0080.03712.39
5.4.210.0050.03812.39
5.4.200.0060.03712.39
5.4.190.0110.03212.39
5.4.180.0040.03912.38
5.4.170.0090.03412.40
5.4.160.0060.04212.39
5.4.150.0090.03412.39
5.4.140.0070.03812.08
5.4.130.0110.03212.06
5.4.120.0120.03212.02
5.4.110.0100.03312.02
5.4.100.0090.03412.02
5.4.90.0090.03512.02
5.4.80.0080.03612.02
5.4.70.0070.03612.01
5.4.60.0070.03512.01
5.4.50.0100.03812.01
5.4.40.0090.04212.00
5.4.30.0060.03712.00
5.4.20.0040.03812.00
5.4.10.0050.03612.00
5.4.00.0040.03911.49
5.3.290.0050.04212.80
5.3.280.0070.03912.71
5.3.270.0080.03812.72
5.3.260.0040.04212.72
5.3.250.0060.03812.72
5.3.240.0050.04012.72
5.3.230.0080.03612.71
5.3.220.0080.05412.68
5.3.210.0050.04212.68
5.3.200.0120.03212.68
5.3.190.0070.03912.68
5.3.180.0040.04012.67
5.3.170.0050.03912.66
5.3.160.0100.05012.67
5.3.150.0040.04012.67
5.3.140.0090.03512.66
5.3.130.0050.04112.66
5.3.120.0070.03812.65
5.3.110.0070.03912.66
5.3.100.0050.03912.13
5.3.90.0080.03412.11
5.3.80.0050.03812.10
5.3.70.0060.03812.10
5.3.60.0050.03812.09
5.3.50.0080.03512.04
5.3.40.0040.03912.04
5.3.30.0060.03612.00
5.3.20.0030.03911.77
5.3.10.0060.03611.74
5.3.00.0080.03511.73
5.2.170.0050.0309.23
5.2.160.0080.0269.23
5.2.150.0060.0309.23
5.2.140.0040.0329.23
5.2.130.0050.0299.19
5.2.120.0080.0269.18
5.2.110.0080.0269.20
5.2.100.0030.0299.19
5.2.90.0060.0289.19
5.2.80.0050.0309.19
5.2.70.0040.0319.19
5.2.60.0030.0329.15
5.2.50.0050.0309.12
5.2.40.0040.0299.09
5.2.30.0060.0279.06
5.2.20.0010.0339.05
5.2.10.0050.0288.96
5.2.00.0020.0328.82
5.1.60.0070.0238.10
5.1.50.0040.0258.10
5.1.40.0030.0268.08
5.1.30.0050.0258.43
5.1.20.0060.0248.45
5.1.10.0050.0258.18
5.1.00.0050.0258.18
5.0.50.0020.0236.66
5.0.40.0060.0176.52
5.0.30.0040.0316.34
5.0.20.0080.0246.30
5.0.10.0050.0196.28
5.0.00.0030.0316.27
4.4.90.0040.0144.78
4.4.80.0050.0134.75
4.4.70.0010.0184.75
4.4.60.0030.0164.75
4.4.50.0030.0174.77
4.4.40.0030.0284.71
4.4.30.0020.0174.75
4.4.20.0040.0154.84
4.4.10.0040.0154.85
4.4.00.0030.0254.76
4.3.110.0010.0174.67
4.3.100.0020.0164.67
4.3.90.0050.0134.63
4.3.80.0030.0244.59
4.3.70.0020.0154.63
4.3.60.0030.0154.63
4.3.50.0010.0184.63
4.3.40.0030.0264.54
4.3.30.0020.0193.30
4.3.20.0030.0223.28
4.3.10.0020.0213.23
4.3.00.0100.00715.25

preferences:
37.96 ms | 401 KiB | 5 Q