3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo implements IteratorAggregate { private $data = [ 'foo' => 'bar', 'bar' => 'baz' ]; public function getIterator() { return new ArrayIterator($this->data); } } $Foo = new Foo(); foreach($Foo as $key => $value) { echo $key, ':', $value, PHP_EOL; }

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.0110.00416.63
8.3.50.0150.00322.07
8.3.40.0100.00718.67
8.3.30.0090.00619.08
8.3.20.0070.00020.34
8.3.10.0050.00323.51
8.3.00.0050.00520.80
8.2.180.0080.00816.71
8.2.170.0070.01022.96
8.2.160.0130.00720.35
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0160.00326.16
8.2.120.0000.00722.13
8.2.110.0100.01022.02
8.2.100.0040.00717.78
8.2.90.0040.00419.22
8.2.80.0090.00017.97
8.2.70.0000.00817.50
8.2.60.0040.00717.80
8.2.50.0090.00018.07
8.2.40.0030.00618.22
8.2.30.0070.00017.94
8.2.20.0060.00317.59
8.2.10.0030.00617.72
8.2.00.0070.00017.67
8.1.280.0050.00825.92
8.1.270.0060.00323.98
8.1.260.0040.00426.35
8.1.250.0000.01428.09
8.1.240.0090.01223.84
8.1.230.0040.00818.92
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0060.00317.38
8.1.190.0040.00417.43
8.1.180.0040.00418.10
8.1.170.0060.00318.59
8.1.160.0000.00822.02
8.1.150.0050.00218.60
8.1.140.0040.00417.51
8.1.130.0000.00717.89
8.1.120.0000.00717.51
8.1.110.0040.00417.40
8.1.100.0100.00017.41
8.1.90.0040.00417.46
8.1.80.0000.00717.39
8.1.70.0040.00417.32
8.1.60.0000.00817.42
8.1.50.0040.00417.42
8.1.40.0000.00717.59
8.1.30.0000.00817.48
8.1.20.0050.00317.67
8.1.10.0040.00417.56
8.1.00.0020.00917.56
8.0.300.0070.00018.77
8.0.290.0000.00717.05
8.0.280.0030.00318.44
8.0.270.0070.00017.35
8.0.260.0030.00316.73
8.0.250.0000.00716.93
8.0.240.0030.00316.90
8.0.230.0030.00316.89
8.0.220.0020.00516.96
8.0.210.0030.00616.81
8.0.200.0000.00716.91
8.0.190.0000.00817.05
8.0.180.0030.00716.96
8.0.170.0000.00816.89
8.0.160.0070.00016.94
8.0.150.0000.00716.89
8.0.140.0070.00016.84
8.0.130.0000.00613.34
8.0.120.0050.00316.87
8.0.110.0050.00216.80
8.0.100.0040.00416.76
8.0.90.0040.00416.91
8.0.80.0130.00316.88
8.0.70.0000.00716.78
8.0.60.0040.00416.95
8.0.50.0000.00716.95
8.0.30.0080.01217.07
8.0.20.0140.00517.40
8.0.10.0000.00816.89
8.0.00.0140.00616.93
7.4.330.0000.00615.00
7.4.320.0030.00316.36
7.4.300.0000.00716.61
7.4.290.0030.00316.59
7.4.280.0000.00716.40
7.4.270.0040.00416.55
7.4.260.0030.00716.50
7.4.250.0030.00316.50
7.4.240.0000.00716.55
7.4.230.0030.00516.41
7.4.220.0150.01216.50
7.4.210.0090.00716.46
7.4.200.0000.00816.41
7.4.190.0000.00716.60
7.4.160.0000.01716.42
7.4.150.0150.00617.40
7.4.140.0120.00517.86
7.4.130.0060.01316.50
7.4.120.0140.00316.53
7.4.110.0070.01016.42
7.4.100.0150.00316.56
7.4.90.0030.01316.66
7.4.80.0030.01419.39
7.4.70.0120.00916.42
7.4.60.0030.01316.51
7.4.50.0030.00616.61
7.4.40.0040.01122.77
7.4.30.0130.00316.59
7.4.00.0040.01415.23
7.3.330.0000.00513.17
7.3.320.0050.00013.32
7.3.310.0070.00016.16
7.3.300.0000.00616.28
7.3.290.0060.01516.30
7.3.280.0080.01016.30
7.3.270.0110.00617.40
7.3.260.0140.00916.30
7.3.250.0120.00516.49
7.3.240.0140.00316.40
7.3.230.0100.00716.48
7.3.210.0060.01216.66
7.3.200.0180.00019.39
7.3.190.0100.00616.47
7.3.180.0030.01816.28
7.3.170.0100.00616.59
7.3.160.0070.01616.18
7.3.120.0070.00714.52
7.2.330.0040.01316.48
7.2.320.0130.01016.69
7.2.310.0090.01316.66
7.2.300.0050.01116.73
7.2.290.0050.01116.58
7.2.60.0040.01117.02
7.2.00.0060.00619.50
7.1.200.0070.00715.87
7.1.100.0000.01417.75
7.1.70.0000.00717.21
7.1.60.0140.01119.29
7.1.50.0040.01617.05
7.1.00.0000.08022.51
7.0.200.0000.01116.88
7.0.140.0070.06722.16
7.0.100.0200.04319.89
7.0.90.0100.08319.88
7.0.80.0030.06319.91
7.0.70.0100.08320.01
7.0.60.0170.07719.92
7.0.50.0100.08020.29
7.0.40.0130.07720.13
7.0.30.0100.09020.15
7.0.20.0070.07320.10
7.0.10.0100.08320.05
7.0.00.0030.07720.11
5.6.250.0100.07720.63
5.6.240.0070.08320.69
5.6.230.0130.08020.50
5.6.220.0130.07720.73
5.6.210.0000.08720.77
5.6.200.0030.08321.14
5.6.190.0000.08321.12
5.6.180.0070.08321.14
5.6.170.0130.07321.06
5.6.160.0000.08321.09
5.6.150.0100.08021.08
5.6.140.0130.07321.11
5.6.130.0100.08321.02
5.6.120.0070.09021.12
5.6.110.0200.06321.02
5.6.100.0130.06321.16
5.6.90.0070.08021.03
5.6.80.0030.07720.34
5.6.70.0170.06720.41
5.6.60.0100.07020.45
5.6.50.0100.07020.50
5.6.40.0000.09020.38
5.6.30.0030.09020.41
5.6.20.0170.06720.24
5.6.10.0130.07720.43
5.6.00.0170.07020.39
5.5.380.0070.04320.43
5.5.370.0100.08720.36
5.5.360.0200.07020.53
5.5.350.0030.07720.43
5.5.340.0100.08320.86
5.5.330.0000.08320.80
5.5.320.0170.07720.74
5.5.310.0030.08720.82
5.5.300.0070.08320.89
5.5.290.0130.07320.72
5.5.280.0070.08320.89
5.5.270.0130.08020.82
5.5.260.0070.08720.91
5.5.250.0100.06720.73
5.5.240.0100.05720.22
5.5.230.0100.07020.26
5.5.220.0030.06320.26
5.5.210.0070.05320.21
5.5.200.0100.07720.13
5.5.190.0100.07319.96
5.5.180.0030.07720.27
5.5.160.0130.06720.21
5.5.150.0070.07720.12
5.5.140.0100.07720.27
5.5.130.0030.07020.26
5.5.120.0100.07020.07
5.5.110.0170.07320.12
5.5.100.0130.07319.98
5.5.90.0130.07320.06
5.5.80.0100.04720.07
5.5.70.0070.07320.04
5.5.60.0130.05720.10
5.5.50.0070.08020.02
5.5.40.0100.07020.15
5.5.30.0130.07720.13
5.5.20.0070.08020.08
5.5.10.0270.06020.06
5.5.00.0100.07020.05
5.4.450.0130.05019.45
5.4.440.0030.06319.18
5.4.430.0030.08019.35
5.4.420.0030.08719.22
5.4.410.0130.07719.38
5.4.400.0070.07318.95
5.4.390.0100.06319.14
5.4.380.0130.06719.05
5.4.370.0070.05019.11
5.4.360.0100.07718.85
5.4.350.0030.08318.91
5.4.340.0070.07719.12
5.4.320.0030.08319.00
5.4.310.0070.08019.03
5.4.300.0070.06319.14
5.4.290.0070.06019.14
5.4.280.0100.07319.04
5.4.270.0170.07018.84
5.4.260.0100.04019.23
5.4.250.0030.07719.17
5.4.240.0170.07018.87
5.4.230.0070.07719.20
5.4.220.0070.07319.24
5.4.210.0000.08019.18
5.4.200.0130.05319.06
5.4.190.0030.06718.88
5.4.180.0030.04718.93
5.4.170.0070.08018.93
5.4.160.0200.06719.13
5.4.150.0070.07019.16
5.4.140.0100.07716.19
5.4.130.0070.07316.43
5.4.120.0030.07316.42
5.4.110.0030.07716.50
5.4.100.0100.07316.44
5.4.90.0070.04316.32
5.4.80.0130.06316.45
5.4.70.0130.05016.33
5.4.60.0030.06016.37
5.4.50.0030.07316.39
5.4.40.0100.07016.58
5.4.30.0030.06016.36
5.4.20.0100.06316.33
5.4.10.0030.08016.40
5.4.00.0070.07315.90
5.3.290.0030.05314.77
5.3.280.0100.07714.64
5.3.270.0100.06714.71
5.3.260.0100.07014.52
5.3.250.0030.07314.63
5.3.240.0100.06014.69
5.3.230.0100.07014.52
5.3.220.0030.06314.63
5.3.210.0100.07714.65
5.3.200.0000.08014.65
5.3.190.0130.07314.51
5.3.180.0100.06714.66
5.3.170.0100.07314.66
5.3.160.0130.07314.49
5.3.150.0030.06714.65
5.3.140.0100.06714.54
5.3.130.0100.07014.51
5.3.120.0130.03314.61
5.3.110.0130.06014.66
5.3.100.0070.07313.98
5.3.90.0100.04313.94
5.3.80.0070.05314.00
5.3.70.0000.04714.04
5.3.60.0130.06714.01
5.3.50.0200.05713.99
5.3.40.0130.07313.87
5.3.30.0100.07314.00
5.3.20.0100.07013.57
5.3.10.0070.05313.58
5.3.00.0130.06313.64
5.2.170.0070.05011.54
5.2.160.0030.06311.54
5.2.150.0130.03311.54
5.2.140.0030.06311.54
5.2.130.0100.02711.54
5.2.120.0100.06011.54
5.2.110.0030.03011.54
5.2.100.0070.04311.54
5.2.90.0030.05711.54
5.2.80.0070.06011.54
5.2.70.0030.06011.54
5.2.60.0100.06311.54
5.2.50.0030.05711.54
5.2.40.0070.04011.54
5.2.30.0100.05311.54
5.2.20.0100.05311.54
5.2.10.0070.04011.54
5.2.00.0070.06011.54
5.1.60.0070.04011.54
5.1.50.0070.05011.54
5.1.40.0100.05011.54
5.1.30.0070.04311.54
5.1.20.0070.05311.54
5.1.10.0030.05311.54
5.1.00.0070.05311.54
5.0.50.0000.05011.54
5.0.40.0000.04711.54
5.0.30.0070.05711.54
5.0.20.0030.04711.54
5.0.10.0030.03711.54
5.0.00.0070.06011.54
4.4.90.0070.03311.54
4.4.80.0030.03711.54
4.4.70.0070.03711.54
4.4.60.0030.03011.54
4.4.50.0070.03311.54
4.4.40.0000.05311.54
4.4.30.0030.03011.54
4.4.20.0030.03711.54
4.4.10.0070.02311.54
4.4.00.0030.05011.54
4.3.110.0000.03311.54
4.3.100.0000.04011.54
4.3.90.0030.03011.54
4.3.80.0000.05711.54
4.3.70.0070.02311.54
4.3.60.0000.01711.54
4.3.50.0000.03711.54
4.3.40.0030.05011.54
4.3.30.0000.04011.54
4.3.20.0070.03311.54
4.3.10.0030.03711.54
4.3.00.0000.03311.54

preferences:
45.93 ms | 401 KiB | 5 Q