3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Odometer { public function __construct(array $values, $places){ $this->values = array_values($values); $this->places = $places; // 0=>a, 1=>b, ... prints [a],[b],... $this->output = reset($values); // [0]=>0, [0]=>1, [0]=>2, ...[] $this->register[0] = key($values); end($values); $this->limit = key($values); } public function iterate(){ for($i = 0; $i < count($register); $i++){ if($this->register[$i] > $this->limit){ $this->register[$i] = 0; if(isset($this->register[$i+1])){ $this->register[$i+1]++; } else { $this->register[$i+1] = 0; } } } $this->register[0]++; } public function setMeter(){ for($i = 0; $i < count($this->register); $i++){ $this->meter[$i] = $this->values[$this->register[$i]]; } } public function readMeter(){ $this->setMeter(); return '[' . implode('][', $this->meter) . ']'; } }

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.0140.00716.38
8.3.50.0150.00521.94
8.3.40.0190.00018.58
8.3.30.0040.01818.38
8.3.20.0080.00018.65
8.3.10.0040.00421.91
8.3.00.0040.00421.57
8.2.180.0040.01116.50
8.2.170.0140.00722.96
8.2.160.0000.01322.27
8.2.150.0000.00924.18
8.2.140.0100.00024.66
8.2.130.0050.00326.16
8.2.120.0040.00419.47
8.2.110.0060.00620.91
8.2.100.0100.00617.59
8.2.90.0030.00617.78
8.2.80.0040.00418.09
8.2.70.0000.00917.50
8.2.60.0040.00417.91
8.2.50.0030.00518.10
8.2.40.0080.00020.41
8.2.30.0070.00019.12
8.2.20.0000.00717.94
8.2.10.0050.00217.98
8.2.00.0000.00717.53
8.1.280.0060.01225.92
8.1.270.0000.00722.02
8.1.260.0000.00826.35
8.1.250.0000.00828.09
8.1.240.0030.00622.29
8.1.230.0090.00320.91
8.1.220.0000.00817.74
8.1.210.0000.00818.83
8.1.200.0040.00817.13
8.1.190.0030.00617.22
8.1.180.0040.00418.10
8.1.170.0080.00018.59
8.1.160.0060.00322.12
8.1.150.0040.00422.09
8.1.140.0040.00419.50
8.1.130.0000.00817.48
8.1.120.0030.00617.30
8.1.110.0000.00717.25
8.1.100.0000.00717.29
8.1.90.0040.00417.29
8.1.80.0070.00017.38
8.1.70.0030.00617.38
8.1.60.0000.00917.50
8.1.50.0000.00817.41
8.1.40.0030.00617.42
8.1.30.0030.00517.52
8.1.20.0000.00817.62
8.1.10.0040.00417.43
8.1.00.0000.00917.31
8.0.300.0000.00719.87
8.0.290.0040.00416.58
8.0.280.0030.00518.22
8.0.270.0000.00717.06
8.0.260.0000.00617.04
8.0.250.0000.00716.69
8.0.240.0070.00016.78
8.0.230.0000.00716.79
8.0.220.0040.00416.78
8.0.210.0000.00716.67
8.0.200.0060.00016.84
8.0.190.0030.00516.88
8.0.180.0000.00716.77
8.0.170.0040.00416.80
8.0.160.0000.00816.71
8.0.150.0000.00716.59
8.0.140.0000.00716.75
8.0.130.0050.00313.23
8.0.120.0050.00316.62
8.0.110.0000.00716.74
8.0.100.0000.00716.72
8.0.90.0040.00416.72
8.0.80.0120.00316.71
8.0.70.0070.00016.71
8.0.60.0040.00416.82
8.0.50.0000.00716.80
8.0.30.0140.00516.81
8.0.20.0080.01017.40
8.0.10.0040.00416.86
8.0.00.0110.00716.41
7.4.330.0000.00515.55
7.4.320.0030.00316.28
7.4.300.0060.00016.39
7.4.290.0040.00416.46
7.4.280.0080.00016.30
7.4.270.0030.00316.24
7.4.260.0030.00316.41
7.4.250.0000.00816.34
7.4.240.0040.00416.38
7.4.230.0030.00316.43
7.4.220.0000.00716.27
7.4.210.0070.00716.55
7.4.200.0070.00016.50
7.4.160.0110.00816.38
7.4.150.0070.01117.40
7.4.140.0090.01017.86
7.4.130.0140.00616.41
7.4.120.0110.00916.35
7.4.110.0100.00716.23
7.4.100.0100.01316.50
7.4.90.0150.00316.40
7.4.80.0090.00919.39
7.4.70.0040.01216.39
7.4.60.0060.01116.35
7.4.50.0040.01116.37
7.4.40.0090.00816.38
7.4.30.0080.00816.47
7.4.00.0130.00514.80
7.3.330.0000.00613.17
7.3.320.0000.00613.01
7.3.310.0030.00316.09
7.3.300.0030.00316.08
7.3.290.0050.01016.24
7.3.280.0090.00716.13
7.3.270.0100.01317.40
7.3.260.0120.00916.36
7.3.250.0090.00716.26
7.3.240.0060.01016.16
7.3.230.0030.01416.39
7.3.210.0070.01016.46
7.3.200.0120.00916.32
7.3.190.0120.00416.56
7.3.180.0100.00716.30
7.3.170.0130.00316.07
7.3.160.0060.00916.37
7.3.120.0060.01114.85
7.3.110.0100.00814.69
7.3.100.0090.00914.47
7.3.90.0080.01114.54
7.3.80.0100.00414.80
7.3.70.0040.00714.67
7.3.60.0070.00614.59
7.3.50.0060.00614.81
7.3.40.0080.00514.63
7.3.30.0060.00814.77
7.3.20.0060.01116.41
7.3.10.0060.00616.44
7.3.00.0080.00716.45
7.2.330.0070.01016.52
7.2.320.0110.01116.53
7.2.310.0070.01516.57
7.2.300.0220.00016.32
7.2.290.0140.00416.64
7.2.250.0030.01515.00
7.2.240.0040.01414.95
7.2.230.0120.00514.96
7.2.220.0050.00914.87
7.2.210.0080.00314.83
7.2.200.0060.00814.65
7.2.190.0030.01114.94
7.2.180.0090.00314.83
7.2.170.0060.00814.83
7.2.60.0160.00616.70
7.2.50.0160.00316.34
7.2.00.0030.01318.85
7.1.330.0060.00815.55
7.1.320.0110.00215.63
7.1.310.0080.00515.49
7.1.300.0090.00715.66
7.1.290.0050.01015.44
7.1.280.0050.00915.40
7.1.270.0080.00515.64
7.1.260.0050.00815.50
7.1.200.0030.01015.50
7.1.70.0000.00716.94
7.1.60.0030.00917.09
7.1.00.0070.06722.33
7.0.200.0030.00316.29
7.0.120.0030.06022.02
7.0.110.0070.05722.14
7.0.100.0100.05322.10
7.0.90.0130.05322.11
7.0.80.0100.06722.11
7.0.70.0030.06022.07
7.0.60.0030.05322.11
7.0.50.0100.05722.13
7.0.40.0000.06322.13
7.0.30.0000.07722.11
7.0.20.0130.05022.04
7.0.10.0100.05322.19
7.0.00.0030.06021.98
5.6.270.0170.04720.91
5.6.260.0200.04320.88
5.6.250.0070.05320.84
5.6.240.0130.05721.09
5.6.230.0130.05720.94
5.6.220.0100.05320.86
5.6.210.0000.06020.91
5.6.200.0100.05721.04
5.6.190.0170.05320.77
5.6.180.0070.06321.03
5.6.170.0000.06320.95
5.6.160.0070.05320.86
5.6.150.0030.06320.80
5.6.140.0230.04320.84
5.6.130.0000.06021.10
5.6.120.0070.05721.07
5.6.110.0170.05021.00
5.6.100.0130.05321.05
5.6.90.0000.06021.05
5.6.80.0100.04720.27
5.6.70.0030.05720.31
5.6.60.0030.05720.23
5.6.50.0000.05720.32
5.6.40.0130.04720.18
5.6.30.0070.05320.12
5.6.20.0070.06320.17
5.6.10.0070.05020.45
5.6.00.0030.05320.36

preferences:
65.16 ms | 401 KiB | 5 Q