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->attach($aIterator); $multipleIterator->attach($bIterator); $multipleIterator->attach($cIterator); $multipleIterator->attach($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.0150.00318.81
8.3.50.0110.00822.11
8.3.40.0130.00718.97
8.3.30.0110.00419.04
8.3.20.0040.00420.30
8.3.10.0080.00021.91
8.3.00.0030.00517.93
8.2.180.0140.00716.63
8.2.170.0090.00622.96
8.2.160.0100.00322.25
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0050.00321.09
8.2.110.0060.00322.24
8.2.100.0030.01017.95
8.2.90.0040.00418.96
8.2.80.0050.00317.97
8.2.70.0060.00317.63
8.2.60.0030.00618.04
8.2.50.0090.00018.07
8.2.40.0000.00918.16
8.2.30.0000.00718.13
8.2.20.0050.00217.74
8.2.10.0070.00018.00
8.2.00.0040.00417.68
8.1.280.0100.00325.92
8.1.270.0040.00423.79
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0080.00023.96
8.1.230.0040.00719.14
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0000.00917.35
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0040.00418.65
8.1.160.0040.00422.01
8.1.150.0030.00518.79
8.1.140.0000.00717.46
8.1.130.0040.00417.89
8.1.120.0040.00417.36
8.1.110.0040.00417.40
8.1.100.0040.00417.38
8.1.90.0070.00017.47
8.1.80.0040.00417.34
8.1.70.0030.00317.35
8.1.60.0000.00717.54
8.1.50.0050.00317.49
8.1.40.0030.00617.48
8.1.30.0040.00417.66
8.1.20.0050.00317.72
8.1.10.0030.00617.47
8.1.00.0050.00217.47
8.0.300.0000.00818.77
8.0.290.0060.00316.88
8.0.280.0000.00818.46
8.0.270.0070.00017.14
8.0.260.0000.00717.16
8.0.250.0040.00417.08
8.0.240.0040.00416.89
8.0.230.0030.00316.90
8.0.220.0030.00316.90
8.0.210.0030.00516.96
8.0.200.0030.00317.02
8.0.190.0000.00817.04
8.0.180.0070.00016.97
8.0.170.0030.00616.90
8.0.160.0000.00716.90
8.0.150.0050.00216.83
8.0.140.0060.00316.93
8.0.130.0060.00013.39
8.0.120.0030.00516.89
8.0.110.0040.00416.95
8.0.100.0040.00416.75
8.0.90.0040.00416.88
8.0.80.0070.00716.98
8.0.70.0060.00316.83
8.0.60.0030.00316.91
8.0.50.0070.00016.86
8.0.30.0080.01117.16
8.0.20.0160.01017.40
8.0.10.0040.00417.02
8.0.00.0090.01016.79
7.4.330.0050.00015.06
7.4.320.0040.00416.51
7.4.300.0000.00716.51
7.4.290.0000.00716.43
7.4.280.0040.00416.61
7.4.270.0050.00316.37
7.4.260.0000.00816.61
7.4.250.0070.00016.56
7.4.240.0060.00116.55
7.4.230.0070.00016.67
7.4.220.0150.00316.60
7.4.210.0030.01316.64
7.4.200.0030.00416.63
7.4.160.0050.01016.57
7.4.150.0040.01617.40
7.4.140.0090.00817.86
7.4.130.0100.00916.56
7.4.120.0130.00516.58
7.4.110.0110.00716.58
7.4.100.0110.01116.61
7.4.90.0070.01416.37
7.4.80.0110.00819.39
7.4.70.0140.00516.55
7.4.60.0030.01516.58
7.4.50.0040.00416.67
7.4.40.0070.01016.35
7.4.30.0100.00616.72
7.4.00.0030.01414.93
7.3.330.0000.00513.36
7.3.320.0000.00513.12
7.3.310.0030.00316.18
7.3.300.0030.00316.36
7.3.290.0100.00316.35
7.3.280.0100.00716.38
7.3.270.0120.00617.40
7.3.260.0060.01616.66
7.3.250.0060.01116.43
7.3.240.0090.01216.43
7.3.230.0090.00616.46
7.3.210.0090.00816.48
7.3.200.0070.01019.39
7.3.190.0100.01016.61
7.3.180.0080.00816.44
7.3.170.0080.00816.55
7.3.160.0120.00416.37
7.3.120.0090.00614.87
7.2.330.0000.01916.39
7.2.320.0170.00016.50
7.2.310.0100.00716.64
7.2.300.0070.01016.55
7.2.290.0070.01016.77
7.2.60.0070.00716.73
7.1.200.0090.00315.84
7.1.70.0000.01116.77
7.1.60.0070.01719.25
7.1.50.0080.00416.54
7.1.00.0000.07722.35
7.0.200.0030.00616.63
7.0.140.0030.06722.07
7.0.60.0170.08019.99
7.0.50.0030.08017.88
7.0.40.0070.04019.96
7.0.30.0070.05020.26
7.0.20.0330.05320.16
7.0.10.0070.08720.16
7.0.00.0070.07020.26
5.6.280.0100.06721.13
5.6.210.0070.07720.61
5.6.200.0000.04718.16
5.6.190.0130.04720.39
5.6.180.0270.05020.60
5.6.170.0270.04020.47
5.6.160.0400.02320.50
5.6.150.0100.08018.28
5.6.140.0070.03718.25
5.6.130.0070.05718.18
5.6.120.0030.07021.03
5.6.110.0070.03720.98
5.6.100.0130.04320.96
5.6.90.0100.07321.02
5.6.80.0070.07720.51
5.5.350.4230.03720.31
5.5.340.0070.08017.98
5.5.330.0100.04020.29
5.5.320.0370.04320.27
5.5.310.0130.04720.41
5.5.300.0070.04718.09
5.5.290.0170.07317.97
5.5.280.0030.04020.97
5.5.270.0100.03320.89
5.5.260.0030.05020.87
5.5.250.0200.07320.59
5.5.240.0200.07020.24
5.4.450.0330.05019.20
5.4.440.0300.04019.41
5.4.430.0470.04319.16
5.4.420.0330.04019.27
5.4.410.0700.03019.29
5.4.400.0370.03719.22
5.4.390.0330.04719.01
5.4.380.0170.05718.74
5.4.370.0170.05018.73
5.4.360.0130.05018.59
5.4.350.0270.06318.77
5.4.340.0170.05718.61
5.4.320.0050.03712.50
5.4.310.0030.04312.50
5.4.300.0070.03712.50
5.4.290.0070.04112.50
5.4.280.0080.03612.40
5.4.270.0080.04412.40
5.4.260.0060.04012.40
5.4.250.0050.04012.39
5.4.240.0060.03912.39
5.4.230.0080.03712.39
5.4.220.0050.03912.39
5.4.210.0100.03912.39
5.4.200.0060.03912.39
5.4.190.0070.03612.39
5.4.180.0070.03512.39
5.4.170.0040.04012.40
5.4.160.0060.03612.40
5.4.150.0080.03512.39
5.4.140.0050.03912.07
5.4.130.0070.04212.06
5.4.120.0070.03512.02
5.4.110.0040.03812.02
5.4.100.0040.03812.02
5.4.90.0110.03512.02
5.4.80.0060.04612.02
5.4.70.0070.04012.02
5.4.60.0040.03712.01
5.4.50.0060.03612.01
5.4.40.0050.03612.00
5.4.30.0040.03812.00
5.4.20.0060.03712.00
5.4.10.0080.03412.00
5.4.00.0070.03511.49
5.3.290.0070.03812.80
5.3.280.0100.04812.71
5.3.270.0060.03912.73
5.3.260.0120.04912.72
5.3.250.0100.04812.72
5.3.240.0090.03312.72
5.3.230.0070.03912.71
5.3.220.0020.04312.68
5.3.210.0100.03712.68
5.3.200.0100.03312.68
5.3.190.0040.03912.68
5.3.180.0060.03712.67
5.3.170.0050.03712.67
5.3.160.0080.03512.67
5.3.150.0050.03812.67
5.3.140.0050.03712.66
5.3.130.0050.03912.66
5.3.120.0080.03812.66
5.3.110.0070.03912.66
5.3.100.0070.03512.13
5.3.90.0060.03712.12
5.3.80.0070.03512.10
5.3.70.0040.03812.11
5.3.60.0050.03912.09
5.3.50.0040.03812.03
5.3.40.0040.03912.03
5.3.30.0040.03812.00
5.3.20.0040.03811.77
5.3.10.0030.03811.74
5.3.00.0080.03311.73
5.2.170.0050.0329.23
5.2.160.0060.0299.23
5.2.150.0050.0319.23
5.2.140.0040.0319.23
5.2.130.0060.0299.18
5.2.120.0070.0279.18
5.2.110.0060.0289.20
5.2.100.0040.0309.19
5.2.90.0040.0299.19
5.2.80.0060.0309.19
5.2.70.0060.0299.19
5.2.60.0010.0349.14
5.2.50.0080.0279.11
5.2.40.0040.0309.09
5.2.30.0050.0299.06
5.2.20.0020.0319.05
5.2.10.0060.0268.96
5.2.00.0030.0318.82
5.1.60.0030.0258.11
5.1.50.0020.0278.10
5.1.40.0030.0268.08
5.1.30.0030.0278.43
5.1.20.0030.0288.45
5.1.10.0030.0278.18
5.1.00.0050.0258.18
5.0.50.0010.0236.66
5.0.40.0030.0206.52
5.0.30.0040.0316.34
5.0.20.0030.0206.30
5.0.10.0030.0216.28
5.0.00.0040.0316.27
4.4.90.0040.0144.78
4.4.80.0020.0164.76
4.4.70.0030.0154.75
4.4.60.0060.0124.75
4.4.50.0050.0134.77
4.4.40.0020.0264.71
4.4.30.0050.0184.76
4.4.20.0020.0174.85
4.4.10.0040.0144.85
4.4.00.0050.0244.76
4.3.110.0030.0154.67
4.3.100.0040.0134.66
4.3.90.0010.0174.64
4.3.80.0020.0254.58
4.3.70.0020.0204.63
4.3.60.0080.0094.63
4.3.50.0050.0144.63
4.3.40.0030.0244.54
4.3.30.0040.0143.30
4.3.20.0030.0153.28
4.3.10.0040.0143.24
4.3.00.0000.02015.25

preferences:
41.66 ms | 401 KiB | 5 Q