3v4l.org

run code in 300+ PHP versions simultaneously
<?php class BaconClass { private $array; public function __construct() { $this->array = array(); } public function AddBacon($function) { array_push($this->array, $function); } /* ... */ public function GetBacon() { foreach($this->array as $function) { echo $function(); } } } $bacon = new BaconClass(); $bacon->AddBacon(function() { echo "Om nom nom"; }); /* And somewhere else I might have */ $bacon->AddBacon(function() { echo "I like bacon"; }); /* And then after all of this I have */ $bacon->GetBacon();

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.00716.75
8.3.50.0110.00816.67
8.3.40.0110.00418.98
8.3.30.0110.00418.85
8.3.20.0030.00618.54
8.3.10.0000.01118.77
8.3.00.0000.01019.25
8.2.180.0140.00718.41
8.2.170.0030.01022.96
8.2.160.0130.00321.24
8.2.150.0060.00324.18
8.2.140.0120.00324.66
8.2.130.0080.00026.16
8.2.120.0040.00422.12
8.2.110.0030.00621.12
8.2.100.0080.00317.78
8.2.90.0030.00617.75
8.2.80.0040.00418.64
8.2.70.0050.00317.75
8.2.60.0040.00417.50
8.2.50.0040.00417.55
8.2.40.0070.00018.34
8.2.30.0050.00317.95
8.2.20.0030.00617.57
8.2.10.0040.00417.75
8.2.00.0030.00917.73
8.1.280.0120.00625.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00419.43
8.1.230.0090.00720.96
8.1.220.0040.00418.65
8.1.210.0050.00318.77
8.1.200.0040.00417.22
8.1.190.0050.00317.23
8.1.180.0050.00318.10
8.1.170.0070.00018.95
8.1.160.0050.00218.82
8.1.150.0030.00618.63
8.1.140.0030.00517.38
8.1.130.0040.00417.72
8.1.120.0040.00417.41
8.1.110.0040.00417.50
8.1.100.0000.00717.35
8.1.90.0040.00417.36
8.1.80.0000.00817.42
8.1.70.0000.00817.43
8.1.60.0030.00617.59
8.1.50.0040.00417.46
8.1.40.0080.00017.54
8.1.30.0040.00417.65
8.1.20.0050.00317.70
8.1.10.0030.00617.53
8.1.00.0080.00017.39
8.0.300.0000.01018.77
8.0.290.0080.00016.75
8.0.280.0030.00318.44
8.0.270.0030.00316.82
8.0.260.0060.00016.80
8.0.250.0000.00816.89
8.0.240.0080.00017.01
8.0.230.0070.00016.93
8.0.220.0040.00416.80
8.0.210.0070.00016.86
8.0.200.0030.00316.79
8.0.190.0040.00416.93
8.0.180.0000.00816.86
8.0.170.0060.00316.79
8.0.160.0040.00416.82
8.0.150.0000.00816.72
8.0.140.0000.01016.75
8.0.130.0030.00313.32
8.0.120.0040.00416.77
8.0.110.0030.00516.78
8.0.100.0050.00316.88
8.0.90.0000.00716.70
8.0.80.0090.00616.82
8.0.70.0080.00016.84
8.0.60.0040.00416.82
8.0.50.0000.00716.86
8.0.30.0110.01417.02
8.0.20.0120.00917.02
8.0.10.0030.00516.98
8.0.00.0100.00716.80
7.4.330.0030.00313.02
7.4.320.0000.00616.64
7.4.300.0030.00316.51
7.4.290.0030.00716.61
7.4.280.0040.00416.45
7.4.270.0000.00716.51
7.4.260.0050.00013.27
7.4.250.0000.00816.43
7.4.240.0000.00716.63
7.4.230.0030.00316.71
7.4.220.0110.00716.54
7.4.210.0060.00916.67
7.4.200.0040.00416.70
7.4.190.0000.00716.46
7.4.160.0080.00816.30
7.4.150.0060.01316.45
7.4.140.0080.01116.58
7.4.130.0070.01116.60
7.4.120.0080.00816.53
7.4.110.0070.01016.49
7.4.100.0090.00916.44
7.4.90.0070.01016.63
7.4.80.0060.01119.39
7.4.70.0140.00416.66
7.4.60.0040.01116.41
7.4.50.0080.00316.61
7.4.40.0100.00716.39
7.4.30.0130.00316.59
7.4.00.0090.00615.13
7.3.330.0040.00413.18
7.3.320.0060.00013.18
7.3.310.0070.00016.27
7.3.300.0030.00316.18
7.3.290.0070.00616.31
7.3.280.0080.01216.31
7.3.270.0100.00616.55
7.3.260.0100.01016.41
7.3.250.0140.00516.32
7.3.240.0130.01016.28
7.3.230.0110.00616.31
7.3.210.0100.00616.25
7.3.200.0060.01616.36
7.3.190.0090.01216.25
7.3.180.0130.00816.36
7.3.170.0080.00816.32
7.3.160.0090.00616.48
7.3.120.0040.01115.00
7.2.330.0090.01216.77
7.2.320.0090.00916.73
7.2.310.0130.01216.58
7.2.300.0120.00416.63
7.2.290.0070.01416.62
7.1.100.0120.00918.07
7.1.70.0040.00417.02
7.1.60.0160.01019.40
7.1.50.0220.01634.82
7.1.00.0100.06722.51
7.0.200.0680.00314.43
7.0.140.0030.07321.95
7.0.120.0000.07322.12
7.0.60.0230.06020.03
7.0.50.0030.09017.95
7.0.40.0100.06320.02
7.0.30.0430.08320.24
7.0.20.0370.07720.10
7.0.10.0130.06320.15
7.0.00.0030.05320.24
5.6.280.0100.06320.82
5.6.210.0100.07720.51
5.6.200.0070.08318.19
5.6.190.0270.03720.45
5.6.180.3600.03720.42
5.6.170.0400.07720.47
5.6.160.0030.04320.41
5.6.150.0030.07318.19
5.6.140.0070.08018.12
5.6.130.0070.08018.21
5.6.120.0130.07321.13
5.6.110.0070.04721.02
5.6.100.0130.07721.00
5.6.90.0200.06321.01
5.6.80.0100.07720.55
5.6.70.0030.03720.36
5.5.350.0230.07320.39
5.5.340.0070.06318.04
5.5.330.0100.07320.21
5.5.320.0400.04320.37
5.5.310.0170.04320.34
5.5.300.0100.07717.98
5.5.290.0000.04317.93
5.5.280.0100.04720.78
5.5.270.0100.08020.88
5.5.260.0100.08020.94
5.5.250.0030.06020.48
5.5.240.0170.05720.28
5.4.450.0000.06719.49
5.4.440.0030.05719.57
5.4.430.0070.08019.24
5.4.420.0030.07719.19
5.4.410.0270.06319.43
5.4.400.0100.07318.86
5.4.390.0100.07318.92
5.4.380.0070.07319.24
5.4.370.0000.05019.27
5.4.360.0170.07018.87
5.4.350.0130.07019.12
5.4.340.0130.04019.15
5.4.320.0170.06318.88
5.4.310.0030.07718.87
5.4.300.0030.06319.00
5.4.290.0100.07019.14
5.4.280.0100.04719.16
5.4.270.0070.04019.14
5.4.260.0070.06719.14
5.4.250.0100.03319.25
5.4.240.0070.07019.14
5.4.230.0070.06019.14
5.4.220.0030.04018.85
5.4.210.0030.08018.92
5.4.200.0000.04019.23
5.4.190.0030.07319.22
5.4.180.0130.07019.14
5.4.170.0170.07019.14
5.4.160.0030.08019.23
5.4.150.0030.07019.13
5.4.140.0030.07716.49
5.4.130.0070.06316.39
5.4.120.0000.07316.44
5.4.110.0100.05716.34
5.4.100.0070.03316.46
5.4.90.0000.07016.58
5.4.80.0100.07016.45
5.4.70.0070.06316.38
5.4.60.0000.07316.36
5.4.50.0100.07016.39
5.4.40.0100.04016.45
5.4.30.0130.06316.38
5.4.20.0030.08016.27
5.4.10.0000.06016.26
5.4.00.0030.05715.99
5.3.290.0130.05314.71
5.3.280.0000.06014.62
5.3.270.0100.04714.66
5.3.260.0030.05014.62
5.3.250.0070.07014.62
5.3.240.0130.07014.64
5.3.230.0070.06314.64
5.3.220.0030.06314.47
5.3.210.0030.05714.62
5.3.200.0030.06714.59
5.3.190.0070.05714.57
5.3.180.0100.07014.64
5.3.170.0130.07014.73
5.3.160.0070.04014.61
5.3.150.0030.07314.49
5.3.140.0030.07714.48
5.3.130.0030.05314.55
5.3.120.0130.07014.55
5.3.110.0030.07714.71
5.3.100.0070.04014.21
5.3.90.0070.04314.11
5.3.80.0070.04014.02
5.3.70.0100.04014.04
5.3.60.0100.03714.05
5.3.50.0070.07713.96
5.3.40.0030.07313.99
5.3.30.0070.07313.92
5.3.20.0200.06313.75
5.3.10.0100.06013.65
5.3.00.0000.05313.71
5.2.170.0030.05011.15
5.2.160.0100.06311.11
5.2.150.0030.06011.12
5.2.140.0030.03711.11
5.2.130.0000.04711.13
5.2.120.0070.03311.19
5.2.110.0030.06011.07
5.2.100.0070.04711.10
5.2.90.0100.05711.18
5.2.80.0200.04711.17
5.2.70.0100.02311.15
5.2.60.0070.03011.11
5.2.50.0030.04710.99
5.2.40.0030.05310.99
5.2.30.0000.06311.02
5.2.20.0000.05010.97
5.2.10.0030.04310.91
5.2.00.0030.03010.73
5.1.60.0070.0509.91
5.1.50.0030.04010.16
5.1.40.0000.04710.03
5.1.30.0030.02710.40
5.1.20.0030.02710.36
5.1.10.0000.0439.99
5.1.00.0000.03010.04
5.0.50.0070.0478.60
5.0.40.0000.0408.40
5.0.30.0070.0638.26
5.0.20.0100.0408.20
5.0.10.0000.0338.33
5.0.00.0000.0408.21
4.4.90.0000.0278.05
4.4.80.0030.0138.05
4.4.70.0030.0338.05
4.4.60.0030.0378.05
4.4.50.0070.0208.05
4.4.40.0030.0308.05
4.4.30.0070.0338.05
4.4.20.0030.0178.05
4.4.10.0030.0138.05
4.4.00.0070.0438.05
4.3.110.0070.0308.05
4.3.100.0000.0238.05
4.3.90.0030.0338.05
4.3.80.0000.0278.05
4.3.70.0030.0138.05
4.3.60.0030.0138.05
4.3.50.0000.0308.05
4.3.40.0000.0278.05
4.3.30.0030.0138.05
4.3.20.0000.0178.05
4.3.10.0000.0378.05
4.3.00.0030.0338.05

preferences:
76.39 ms | 401 KiB | 5 Q