3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $_foo = array(); public function fill(){ array_push($this->_foo, "hello"); array_push($this->_foo, "world"); } public function getFoo() { return $this->_foo; } } $foo = new Foo(); foreach($foo->fill() as $q){ echo $q; }

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.0070.01416.75
8.3.50.0250.00416.56
8.3.40.0070.01418.88
8.3.30.0080.00618.40
8.3.20.0080.00018.77
8.3.10.0040.00420.39
8.3.00.0160.00019.23
8.2.180.0170.00718.26
8.2.170.0070.00722.96
8.2.160.0100.00321.00
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.77
8.2.110.0120.00920.17
8.2.100.0070.00417.72
8.2.90.0050.00319.17
8.2.80.0060.00319.38
8.2.70.0060.00317.63
8.2.60.0050.00317.93
8.2.50.0050.00318.07
8.2.40.0030.00518.16
8.2.30.0070.00018.11
8.2.20.0000.00917.73
8.2.10.0000.00717.57
8.2.00.0050.00317.75
8.1.280.0160.00325.92
8.1.270.0050.00324.66
8.1.260.0110.00726.35
8.1.250.0040.00428.09
8.1.240.0100.00323.73
8.1.230.0030.00922.61
8.1.220.0040.00418.77
8.1.210.0040.00419.02
8.1.200.0060.00617.35
8.1.190.0040.00417.42
8.1.180.0000.00818.10
8.1.170.0040.00418.90
8.1.160.0060.00318.77
8.1.150.0000.00918.57
8.1.140.0030.00517.39
8.1.130.0070.00017.78
8.1.120.0040.00417.49
8.1.110.0030.00417.39
8.1.100.0050.00317.52
8.1.90.0030.00317.35
8.1.80.0080.00017.50
8.1.70.0000.00717.45
8.1.60.0040.00417.60
8.1.50.0000.00817.50
8.1.40.0000.00817.47
8.1.30.0040.00417.60
8.1.20.0030.00517.68
8.1.10.0040.00417.47
8.1.00.0050.00217.54
8.0.300.0030.00319.98
8.0.290.0040.00416.75
8.0.280.0040.00418.32
8.0.270.0070.00016.89
8.0.260.0030.00316.88
8.0.250.0040.00416.94
8.0.240.0040.00416.90
8.0.230.0030.00317.03
8.0.220.0000.00716.88
8.0.210.0040.00416.95
8.0.200.0000.00717.02
8.0.190.0070.00017.04
8.0.180.0100.00316.86
8.0.170.0040.00416.97
8.0.160.0050.00216.84
8.0.150.0000.00816.80
8.0.140.0000.00716.96
8.0.130.0000.00613.38
8.0.120.0000.00816.92
8.0.110.0080.00017.00
8.0.100.0030.00517.05
8.0.90.0030.00316.91
8.0.80.0120.00316.91
8.0.70.0040.00416.95
8.0.60.0030.00616.95
8.0.50.0040.00416.92
8.0.30.0220.00317.13
8.0.20.0140.00917.15
8.0.10.0000.00716.94
8.0.00.0120.00516.81
7.4.330.0050.00012.98
7.4.320.0000.00616.37
7.4.300.0030.00316.40
7.4.290.0030.00316.52
7.4.280.0000.00716.59
7.4.270.0000.00716.56
7.4.260.0060.00013.26
7.4.250.0050.00316.49
7.4.240.0070.00016.50
7.4.230.0030.00316.25
7.4.220.0090.01316.47
7.4.210.0070.00916.62
7.4.200.0000.00716.68
7.4.190.0000.00716.56
7.4.160.0130.00316.49
7.4.150.0030.01716.65
7.4.140.0070.00916.52
7.4.130.0090.00916.58
7.4.120.0100.00816.39
7.4.110.0030.01416.42
7.4.100.0080.00916.49
7.4.90.0110.00616.45
7.4.80.0150.00719.39
7.4.70.0100.01316.44
7.4.60.0060.01016.49
7.4.50.0080.00416.55
7.4.40.0000.01516.52
7.4.30.0090.00916.63
7.4.00.0000.01415.04
7.3.330.0060.00013.12
7.3.320.0030.00313.29
7.3.310.0030.00316.29
7.3.300.0030.00316.30
7.3.290.0000.01816.31
7.3.280.0090.00816.31
7.3.270.0140.00316.37
7.3.260.0160.00616.29
7.3.250.0110.00816.34
7.3.240.0120.00316.45
7.3.230.0060.01116.29
7.3.210.0160.00316.29
7.3.200.0080.01516.49
7.3.190.0100.00916.39
7.3.180.0110.00516.41
7.3.170.0040.01316.43
7.3.160.0080.01216.30
7.3.120.0070.01014.76
7.2.330.0040.01816.51
7.2.320.0070.01016.39
7.2.310.0130.00616.61
7.2.300.0110.00716.66
7.2.290.0160.00016.59
7.2.60.0060.00916.93
7.2.00.0070.01019.14
7.1.200.0040.00715.93
7.1.100.0000.01318.00
7.1.70.0090.00317.13
7.1.60.0100.01319.40
7.1.50.0070.01716.86
7.1.00.0030.07722.57
7.0.200.0100.00714.73
7.0.140.0030.07322.11
7.0.120.0070.03322.04
7.0.60.0100.08020.04
7.0.50.0030.04017.79
7.0.40.0030.04017.80
7.0.30.0000.04717.82
7.0.20.0070.03717.74
7.0.10.0030.03717.75
7.0.00.0000.04317.75
5.6.280.0070.07321.02
5.6.210.0170.07020.66
5.6.200.0030.04018.16
5.6.190.0100.03318.23
5.6.180.0000.04318.19
5.6.170.0030.04018.18
5.6.160.0030.04018.18
5.6.150.0070.04318.21
5.6.140.0000.04018.15
5.6.130.0030.08318.17
5.6.120.0000.04318.11
5.6.110.0070.04318.15
5.6.100.0100.04718.21
5.6.90.0070.05018.16
5.6.80.0070.08017.49
5.6.70.0000.06017.68
5.6.60.0030.08017.60
5.6.50.0030.03717.60
5.6.40.0030.08317.66
5.6.30.0100.07717.57
5.6.20.0070.08017.56
5.6.10.0070.04017.56
5.6.00.0100.03717.60
5.5.350.0330.07720.43
5.5.340.0000.04017.98
5.5.330.0000.04318.09
5.5.320.0000.04018.05
5.5.310.0030.04317.98
5.5.300.0100.03017.98
5.5.290.0100.06317.94
5.5.280.0070.07317.93
5.5.270.0070.03718.07
5.5.260.0170.02717.96
5.5.250.0070.07317.73
5.5.240.0100.05717.42
5.5.230.0000.08017.35
5.5.220.0000.05017.33
5.5.210.0070.04317.34
5.5.200.0070.07717.37
5.5.190.0070.07717.29
5.5.180.0000.05017.44
5.5.160.0100.04017.27
5.5.150.0070.03317.33
5.5.140.0000.04717.41
5.5.130.0070.06017.33
5.5.120.0070.04317.26
5.5.110.0100.07317.36
5.5.100.0070.06017.25
5.5.90.0000.05017.27
5.5.80.0030.04017.20
5.5.70.0170.06717.21
5.5.60.0070.07317.24
5.5.50.0030.04017.32
5.5.40.0070.04717.22
5.5.30.0070.07717.32
5.5.20.0070.04017.23
5.5.10.0200.06317.20
5.5.00.0030.08017.27
5.4.450.0130.06319.35
5.4.440.0000.04719.38
5.4.430.0030.04719.37
5.4.420.0070.07719.21
5.4.410.0070.03719.33
5.4.400.0200.03019.03
5.4.390.0030.04019.02
5.4.380.0100.07719.03
5.4.370.0000.04319.14
5.4.360.0130.06718.98
5.4.350.0130.06719.09
5.4.340.0200.03319.12
5.4.320.0030.04019.03
5.4.310.0070.05719.03
5.4.300.0030.03719.05
5.4.290.0100.05719.13
5.4.280.0100.04019.04
5.4.270.0070.03719.05
5.4.260.0000.08719.04
5.4.250.0070.04719.02
5.4.240.0000.04319.09
5.4.230.0100.07319.13
5.4.220.0100.04019.01
5.4.210.0030.07718.95
5.4.200.0000.04019.13
5.4.190.0070.07319.03
5.4.180.0000.04319.02
5.4.170.0070.04718.88
5.4.160.0230.05719.14
5.4.150.0100.03319.07
5.4.140.0030.08016.43
5.4.130.0130.05716.28
5.4.120.0000.04716.29
5.4.110.0070.07316.59
5.4.100.0170.06016.45
5.4.90.0070.05716.59
5.4.80.0130.07016.22
5.4.70.0070.03316.46
5.4.60.0130.02716.38
5.4.50.0070.04716.38
5.4.40.0070.04016.43
5.4.30.0070.07016.21
5.4.20.0030.03716.20
5.4.10.0100.05316.32
5.4.00.0070.06715.90
5.3.290.0030.04314.88
5.3.280.0100.04314.64
5.3.270.0100.07014.65
5.3.260.0070.07014.63
5.3.250.0030.05314.46
5.3.240.0100.05314.64
5.3.230.0030.06014.68
5.3.220.0070.07314.61
5.3.210.0070.06014.61
5.3.200.0130.07314.63
5.3.190.0000.05314.61
5.3.180.0030.04014.64
5.3.170.0030.03714.58
5.3.160.0070.04714.63
5.3.150.0070.07714.53
5.3.140.0070.03714.62
5.3.130.0070.03714.50
5.3.120.0130.06714.62
5.3.110.0000.04314.59
5.3.100.0000.04314.01
5.3.90.0070.07714.07
5.3.80.0070.07314.04
5.3.70.0170.06013.91
5.3.60.0070.03714.04
5.3.50.0030.04014.00
5.3.40.0070.06713.94
5.3.30.0000.04713.95
5.3.20.0030.04013.59
5.3.10.0100.06713.73
5.3.00.0070.07313.67
5.2.170.0070.02711.19
5.2.160.0030.04011.15
5.2.150.0030.06311.23
5.2.140.0130.05311.15
5.2.130.0070.03710.95
5.2.120.0100.05711.15
5.2.110.0000.06011.21
5.2.100.0070.06011.02
5.2.90.0000.05011.16
5.2.80.0000.03311.02
5.2.70.0030.02710.98
5.2.60.0070.03011.26
5.2.50.0070.05711.05
5.2.40.0000.04310.98
5.2.30.0030.04010.96
5.2.20.0030.05011.04
5.2.10.0070.04310.70
5.2.00.0030.03010.72
5.1.60.0070.0539.94
5.1.50.0100.0439.98
5.1.40.0000.03310.02
5.1.30.0100.04710.43
5.1.20.0000.03010.36
5.1.10.0000.02710.02
5.1.00.0070.02010.06
5.0.50.0030.0509.29
5.0.40.0030.0209.29
5.0.30.0030.0579.29
5.0.20.0030.0439.29
5.0.10.0000.0409.29
5.0.00.0000.0409.29
4.4.90.0070.0109.29
4.4.80.0000.0409.29
4.4.70.0030.0179.29
4.4.60.0000.0209.29
4.4.50.0070.0239.29
4.4.40.0070.0439.29
4.4.30.0000.0239.29
4.4.20.0100.0109.29
4.4.10.0000.0179.29
4.4.00.0000.0409.29
4.3.110.0100.0279.29
4.3.100.0030.0139.29
4.3.90.0000.0279.29
4.3.80.0000.0309.29
4.3.70.0070.0109.29
4.3.60.0030.0239.29
4.3.50.0000.0179.29
4.3.40.0000.0539.29
4.3.30.0000.0409.29
4.3.20.0000.0279.29
4.3.10.0000.0309.29
4.3.00.0070.0209.29

preferences:
45.74 ms | 401 KiB | 5 Q