3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * @author tuadmin * @version 1.0.0 */ class combinator implements SeekableIterator { private $_n = 0;//float val public function next(){$this->_n++;} public function rewind(){$this->_n = 0;} public function current(){ return $this->_n;} public function key(){} public function valid(){return $this->_n < 10000000000000000000;} public function seek($pos){$this->_n = $pos;} } $comb = new combinator();$float = 10000000000; echo "-------------incorrect limit Iterator float seek----------\n"; foreach(new limitIterator($comb,$float,3) as $current){ echo $current."\n";} echo "-------------correct----------\n"; for($comb->seek($float) ; $comb->current() < $float+3 && $comb->valid();$comb->next()){ echo $comb->current()."\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.70.0070.01016.75
8.3.60.0040.01116.88
8.3.50.0130.00522.89
8.3.40.0130.00618.89
8.3.30.0150.00618.67
8.3.20.0000.00721.73
8.3.10.0080.00021.94
8.3.00.0060.00319.91
8.2.190.0140.00416.75
8.2.180.0120.00325.92
8.2.170.0090.00618.79
8.2.160.0070.00722.96
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00422.25
8.2.120.0060.00326.35
8.2.110.0030.00619.37
8.2.100.0080.00417.78
8.2.90.0050.00319.36
8.2.80.0000.00817.97
8.2.70.0040.00417.75
8.2.60.0040.00417.90
8.2.50.0030.00618.10
8.2.40.0050.00322.32
8.2.30.0040.00421.10
8.2.20.0080.00017.83
8.2.10.0040.00418.20
8.2.00.0000.00718.03
8.1.280.0030.01725.92
8.1.270.0000.00823.95
8.1.260.0070.00028.09
8.1.250.0040.00428.09
8.1.240.0060.00621.94
8.1.230.0070.00420.70
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0030.00617.35
8.1.190.0080.00017.35
8.1.180.0060.00318.10
8.1.170.0080.00018.59
8.1.160.0030.00322.09
8.1.150.0070.00020.89
8.1.140.0000.00719.60
8.1.130.0030.00517.74
8.1.120.0000.00817.51
8.1.110.0000.00717.53
8.1.100.0040.00417.48
8.1.90.0040.00417.51
8.1.80.0040.00417.53
8.1.70.0000.00717.40
8.1.60.0050.00317.59
8.1.50.0050.00317.58
8.1.40.0080.00017.45
8.1.30.0000.00817.70
8.1.20.0040.00417.68
8.1.10.0040.00417.57
8.1.00.0040.00417.54
8.0.300.0080.00018.77
8.0.290.0000.00816.75
8.0.280.0000.00718.56
8.0.270.0020.00517.26
8.0.260.0030.00317.29
8.0.250.0030.00516.87
8.0.240.0000.00917.01
8.0.230.0070.00017.06
8.0.220.0000.00716.92
8.0.210.0030.00316.85
8.0.200.0000.00717.03
8.0.190.0000.00717.05
8.0.180.0070.00016.96
8.0.170.0070.00016.96
8.0.160.0030.00516.92
8.0.150.0040.00316.95
8.0.140.0040.00416.80
8.0.130.0030.00313.39
8.0.120.0040.00416.79
8.0.110.0000.00716.77
8.0.100.0040.00416.97
8.0.90.0000.00816.77
8.0.80.0070.01016.89
8.0.70.0000.00816.88
8.0.60.0040.00416.96
8.0.50.0040.00416.89
8.0.30.0070.00917.27
8.0.20.0100.00917.40
8.0.10.0050.00216.95
8.0.00.0030.01316.95
7.4.330.0050.00015.08
7.4.320.0030.00316.60
7.4.300.0040.00416.40
7.4.290.0050.00316.54
7.4.280.0040.00416.52
7.4.270.0000.00716.56
7.4.260.0000.00816.61
7.4.250.0040.00416.63
7.4.240.0040.00416.55
7.4.230.0000.00816.38
7.4.220.0060.00916.52
7.4.210.0070.01116.62
7.4.200.0080.00016.75
7.4.160.0050.01016.66
7.4.150.0140.00417.40
7.4.140.0110.00617.86
7.4.130.0100.00916.52
7.4.120.0060.01216.49
7.4.110.0120.00616.67
7.4.100.0070.01016.65
7.4.90.0070.01116.51
7.4.80.0060.01819.39
7.4.70.0120.00616.52
7.4.60.0030.01316.55
7.4.50.0070.00716.21
7.4.40.0100.01016.55
7.4.30.0160.00616.61
7.4.00.0030.01115.18
7.3.330.0000.00513.20
7.3.320.0030.00313.31
7.3.310.0000.00616.30
7.3.300.0030.00316.19
7.3.290.0120.00316.36
7.3.280.0060.00916.32
7.3.270.0100.00717.40
7.3.260.0100.01416.45
7.3.250.0100.00716.35
7.3.240.0100.00616.46
7.3.230.0130.00816.56
7.3.210.0120.00416.36
7.3.200.0100.01316.30
7.3.190.0030.01216.63
7.3.180.0070.01016.51
7.3.170.0120.00616.55
7.3.160.0040.01816.59
7.2.330.0110.00716.86
7.2.320.0100.01316.89
7.2.310.0060.01516.49
7.2.300.0070.01016.73
7.2.290.0060.01216.72
7.2.60.0000.01516.86
7.2.00.0090.00619.02
7.1.200.0060.00615.79
7.1.100.0040.00718.18
7.1.70.0000.00917.24
7.1.60.0200.00719.75
7.1.50.0090.00916.88
7.1.00.0030.07322.57
7.0.200.0300.00314.88
7.0.90.2670.00019.93
7.0.80.2330.00020.04
7.0.70.0770.00019.95
7.0.60.0700.00019.99
7.0.50.0800.00020.35
7.0.40.0830.00020.29
7.0.30.0730.00020.45
7.0.20.0730.00020.40
7.0.10.0770.00020.43
7.0.00.0730.00020.22
5.6.240.0800.00020.82
5.6.230.0930.00020.64
5.6.220.0870.00020.61
5.6.210.0870.00020.75
5.6.200.0970.00021.13
5.6.190.0900.00021.07
5.6.180.1000.00021.12
5.6.170.0830.00021.02
5.6.160.0870.00021.07
5.6.150.0830.00021.07
5.6.140.0900.00021.05
5.6.130.1070.00021.10
5.6.120.0800.00021.09
5.6.110.0870.00021.19
5.6.100.0900.00021.17
5.6.90.0800.00021.18
5.6.80.0800.00020.48
5.6.70.0930.00020.45
5.6.60.0830.00020.55
5.6.50.1030.00020.50
5.6.40.0930.00020.44
5.6.30.0830.00020.48
5.6.20.0870.00020.40
5.6.10.0870.00020.46
5.6.00.0870.00020.43

preferences:
42.37 ms | 401 KiB | 5 Q