3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { } class FooCollection implements \Countable, \Iterator { private $fooArray = []; public function addFoo(Foo $foo) { $this->fooArray[] = $foo; } public function addEachFoo(array $fooArray) { foreach ($fooArray as $foo) { $this->addFoo($foo); } } public function count() { ; } public function current() { ; } public function key() { ; } public function next() { ; } public function rewind() { ; } public function valid() { ; } } $fooCollection = new FooCollection(); $fooCollection->addEachFoo([new Foo, new Foo, new Foo]);

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.00016.63
8.3.50.0040.01316.61
8.3.40.0040.01118.92
8.3.30.0110.00418.79
8.3.20.0040.00418.73
8.3.10.0080.00018.90
8.3.00.0040.00419.38
8.2.180.0070.00716.88
8.2.170.0110.00422.96
8.2.160.0040.01119.00
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0070.00026.16
8.2.120.0040.00420.94
8.2.110.0070.00320.93
8.2.100.0040.00717.78
8.2.90.0000.00819.52
8.2.80.0040.00420.36
8.2.70.0050.00317.75
8.2.60.0030.00718.03
8.2.50.0050.00318.07
8.2.40.0030.00618.16
8.2.30.0100.00017.82
8.2.20.0050.00517.67
8.2.10.0000.00717.82
8.2.00.0000.00717.64
8.1.280.0080.00625.92
8.1.270.0000.00723.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.14
8.1.230.0060.00620.96
8.1.220.0050.00317.78
8.1.210.0050.00318.87
8.1.200.0060.00317.36
8.1.190.0000.00817.23
8.1.180.0000.00819.18
8.1.170.0030.00618.54
8.1.160.0040.00419.04
8.1.150.0000.00818.64
8.1.140.0070.00017.38
8.1.130.0000.00717.52
8.1.120.0030.00317.38
8.1.110.0070.00017.47
8.1.100.0070.00017.45
8.1.90.0000.00817.44
8.1.80.0040.00417.48
8.1.70.0050.00317.48
8.1.60.0000.00717.60
8.1.50.0000.00817.52
8.1.40.0030.00517.52
8.1.30.0040.00417.63
8.1.20.0030.00517.54
8.1.10.0000.00817.57
8.1.00.0000.00717.54
8.0.300.0070.00020.07
8.0.290.0000.00816.61
8.0.280.0030.00318.38
8.0.270.0000.00717.33
8.0.260.0000.00816.82
8.0.250.0040.00417.05
8.0.240.0070.00016.95
8.0.230.0040.00416.93
8.0.220.0000.00716.87
8.0.210.0000.00716.99
8.0.200.0040.00416.92
8.0.190.0070.00017.05
8.0.180.0050.00317.04
8.0.170.0000.00816.89
8.0.160.0000.00716.93
8.0.150.0090.00016.89
8.0.140.0050.00316.94
8.0.130.0000.00613.34
8.0.120.0040.00416.79
8.0.110.0000.00716.96
8.0.100.0040.00416.87
8.0.90.0050.00217.01
8.0.80.0140.00716.97
8.0.70.0070.00017.03
8.0.60.0060.00316.84
8.0.50.0000.00916.80
8.0.30.0060.01317.00
8.0.20.0110.00817.10
8.0.10.0040.00417.12
8.0.00.0090.01016.90
7.4.330.0030.00313.03
7.4.320.0000.00816.63
7.4.300.0030.00316.61
7.4.290.0060.00316.51
7.4.280.0030.00616.61
7.4.270.0060.00316.66
7.4.260.0000.00513.23
7.4.250.0050.00316.58
7.4.240.0040.00416.63
7.4.230.0030.00316.68
7.4.220.0090.01216.64
7.4.210.0060.01316.63
7.4.200.0000.00716.36
7.4.190.0040.00416.71
7.4.160.0060.01016.54
7.4.150.0110.00616.52
7.4.140.0080.01117.86
7.4.130.0120.00616.38
7.4.120.0030.01316.58
7.4.110.0070.01416.80
7.4.100.0140.00316.44
7.4.90.0120.00916.45
7.4.80.0090.00919.39
7.4.70.0090.00616.50
7.4.60.0120.00316.44
7.4.50.0060.00016.65
7.4.40.0060.01216.74
7.4.30.0100.00616.45
7.4.00.0040.01114.83
7.3.330.0080.00013.10
7.3.320.0060.00013.30
7.3.310.0040.00416.33
7.3.300.0030.00316.27
7.3.290.0100.00516.29
7.3.280.0030.01116.29
7.3.270.0100.00716.26
7.3.260.0040.01316.60
7.3.240.0110.00616.26
7.3.230.0060.01016.30
7.3.210.0100.00716.60
7.3.200.0100.00716.48
7.3.190.0080.00816.65
7.3.180.0150.00016.28
7.3.170.0150.00316.63
7.3.160.0090.00616.55
7.3.120.0060.01214.83
7.3.110.0110.00714.96
7.3.100.0000.01414.73
7.3.90.0110.00414.89
7.3.80.0100.00015.05
7.3.70.0070.00715.04
7.3.60.0040.01114.78
7.3.50.0000.01414.99
7.3.40.0000.01314.67
7.3.30.0030.01114.59
7.3.20.0070.00716.59
7.3.10.0050.00616.54
7.3.00.0030.01016.70
7.2.330.0090.00916.65
7.2.320.0100.00716.66
7.2.310.0030.01616.87
7.2.300.0070.01016.88
7.2.290.0060.01316.78
7.2.240.0040.01515.07
7.2.230.0030.01415.02
7.2.220.0060.00915.06
7.2.210.0090.00914.72
7.2.200.0040.00715.18
7.2.190.0040.01115.15
7.2.180.0090.00315.01
7.2.170.0090.00614.88
7.2.160.0070.00715.13
7.2.150.0080.00616.98
7.2.140.0030.01316.93
7.2.130.0100.00516.88
7.2.120.0050.00716.88
7.2.110.0070.00716.89
7.2.100.0020.01117.06
7.2.90.0040.00816.91
7.2.80.0040.01116.99
7.2.70.0060.00516.99
7.2.60.0040.00817.04
7.2.50.0040.01116.86
7.2.40.0050.00716.82
7.2.30.0040.00516.81
7.2.20.0090.00416.78
7.2.10.0060.00716.99
7.2.00.0060.00617.80
7.1.330.0070.01015.68
7.1.320.0070.00315.54
7.1.310.0030.00915.79
7.1.300.0000.01215.84
7.1.290.0100.00715.84
7.1.280.0030.00615.79
7.1.270.0000.01415.61
7.1.260.0020.01015.70
7.1.250.0060.00815.79
7.1.200.0040.00715.55
7.1.100.0040.01118.21
7.1.70.0020.00516.90
7.1.60.0040.00819.25
7.1.50.0220.00634.72
7.1.00.0000.03722.33
7.0.200.0040.00716.85
7.0.140.0070.07021.98
7.0.120.0070.06722.18
7.0.60.0270.03719.83
7.0.50.0000.06317.96
7.0.40.0030.08717.74
7.0.30.0100.04717.86
7.0.20.0130.05317.76
7.0.10.0000.07717.71
7.0.00.0100.07317.83
5.6.280.0030.07021.11
5.6.210.0070.08020.49
5.6.200.0100.08718.23
5.6.190.0070.08018.28
5.6.180.0170.07018.17
5.6.170.0070.08018.18
5.6.160.0130.07318.17
5.6.150.0100.06018.19
5.6.140.0070.08318.15
5.6.130.0070.07718.16
5.6.120.0000.09718.18
5.6.110.0070.08018.24
5.6.100.0030.04718.11
5.6.90.0100.08718.20
5.6.80.0070.08317.62
5.6.70.0070.07717.53
5.6.60.0000.04317.55
5.6.50.0100.06717.60
5.6.40.0330.04717.54
5.6.30.0070.07717.51
5.6.20.0030.04717.53
5.6.10.0100.07017.58
5.6.00.0030.05317.53
5.5.350.0030.08020.33
5.5.340.0100.05717.94
5.5.330.0100.05717.93
5.5.320.0130.04317.99
5.5.310.0070.04718.06
5.5.300.0100.07018.08
5.5.290.0030.06317.98
5.5.280.0030.04317.94
5.5.270.0070.07017.97
5.5.260.0170.07017.99
5.5.250.0200.05317.87
5.5.240.0030.08017.34
5.5.230.0030.06317.32
5.5.220.0070.07717.30
5.5.210.0100.04717.39
5.5.200.0070.06317.37
5.5.190.0030.08017.29
5.5.180.0030.06017.36
5.5.160.0030.04017.39
5.5.150.0000.05017.33
5.5.140.0130.06717.25
5.5.130.0130.06317.31
5.5.120.0070.06717.39
5.5.110.0100.03317.43
5.5.100.0030.04717.21
5.5.90.0100.06717.24
5.5.80.0000.06717.20
5.5.70.0130.07017.22
5.5.60.0070.03717.20
5.5.50.0100.04317.20
5.5.40.0270.05717.16
5.5.30.0100.06317.20
5.5.20.0070.04717.26
5.5.10.0030.04717.21
5.5.00.0070.08017.27
5.4.450.0100.07019.47
5.4.440.0100.07319.38
5.4.430.0030.08019.30
5.4.420.0030.04319.38
5.4.410.0100.07319.31
5.4.400.0130.06719.02
5.4.390.0070.04319.05
5.4.380.0130.07018.91
5.4.370.0030.04319.02
5.4.360.0070.08018.88
5.4.350.0070.07719.13
5.4.340.0030.04719.05
5.4.320.0000.05319.02
5.4.310.0170.06719.05
5.4.300.0100.07318.95
5.4.290.0070.07318.95
5.4.280.0030.07319.12
5.4.270.0200.06319.01
5.4.260.0100.07019.27
5.4.250.0100.03318.88
5.4.240.0000.08019.02
5.4.230.0170.06018.98
5.4.220.0100.03719.01
5.4.210.0070.07719.09
5.4.200.0070.05018.94
5.4.190.0130.05719.13
5.4.180.0030.05018.98
5.4.170.0200.06318.88
5.4.160.0070.03719.08
5.4.150.0100.07019.06
5.4.140.0030.07316.39
5.4.130.0070.04316.39
5.4.120.0070.04316.39
5.4.110.0100.05316.43
5.4.100.0100.06316.55
5.4.90.0000.04716.49
5.4.80.0100.06716.22
5.4.70.0070.04716.38
5.4.60.0130.07016.48
5.4.50.0000.07716.38
5.4.40.0170.06316.50
5.4.30.0070.07716.42
5.4.20.0000.06716.21
5.4.10.0070.07316.38
5.4.00.0030.05015.84
5.3.290.0030.04714.71
5.3.280.0000.08014.55
5.3.270.0100.05714.61
5.3.260.0030.07314.58
5.3.250.0070.07014.67
5.3.240.0030.05314.56
5.3.230.0170.06314.63
5.3.220.0070.05314.57
5.3.210.0070.07314.60
5.3.200.0100.07314.61
5.3.190.0100.07314.59
5.3.180.0030.04014.58
5.3.170.0070.06014.59
5.3.160.0000.05714.66
5.3.150.0100.06714.62
5.3.140.0030.07314.59
5.3.130.0100.07714.49
5.3.120.0100.04714.51
5.3.110.0100.07314.55
5.3.100.0000.05013.90
5.3.90.0130.06313.98
5.3.80.0130.06714.04
5.3.70.0070.07314.00
5.3.60.0100.07014.00
5.3.50.0070.06714.02
5.3.40.0100.06313.99
5.3.30.0000.04314.12
5.3.20.0030.03713.68
5.3.10.0070.05013.74
5.3.00.0070.05713.68
5.2.170.0030.04711.35
5.2.160.0070.03311.35
5.2.150.0130.04311.36
5.2.140.0070.06011.13
5.2.130.0070.02711.06
5.2.120.0070.06011.09
5.2.110.0000.06311.07
5.2.100.0100.05311.20
5.2.90.0000.06711.20
5.2.80.0070.04011.16
5.2.70.0000.03711.14
5.2.60.0070.06011.08
5.2.50.0100.03011.22
5.2.40.0030.06310.88
5.2.30.0100.04010.97
5.2.20.0030.04710.97
5.2.10.0000.06010.88
5.2.00.0130.03010.79
5.1.60.0070.0309.83
5.1.50.0030.0539.83
5.1.40.0000.04010.18
5.1.30.0030.05710.39
5.1.20.0000.05310.36
5.1.10.0000.04010.13
5.1.00.0030.05710.17
5.0.50.0030.0478.62
5.0.40.0030.0478.44
5.0.30.0130.0508.24
5.0.20.0030.0408.13
5.0.10.0000.0278.23
5.0.00.0030.0408.09
4.4.90.0000.0337.85
4.4.80.0070.0277.85
4.4.70.0000.0337.85
4.4.60.0000.0207.85
4.4.50.0030.0307.85
4.4.40.0000.0407.85
4.4.30.0000.0377.85
4.4.20.0030.0277.85
4.4.10.0070.0237.85
4.4.00.0070.0507.85
4.3.110.0030.0307.85
4.3.100.0070.0177.85
4.3.90.0030.0177.85
4.3.80.0070.0207.85
4.3.70.0030.0137.85
4.3.60.0030.0377.85
4.3.50.0030.0177.85
4.3.40.0070.0337.85
4.3.30.0030.0277.85
4.3.20.0000.0237.85
4.3.10.0000.0277.85
4.3.00.0000.0337.85

preferences:
43.49 ms | 401 KiB | 5 Q