3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $bar = 'hello world'; } class FriendOfFoo { public function doSomething($foo) { return function() use ($foo) { echo $foo->bar; }; } } $service = new FriendOfFoo(); $closure = $service->doSomething($foo)->bindTo($foo); $closure();

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.88
8.3.50.0150.00517.39
8.3.40.0090.00618.78
8.3.30.0110.00318.67
8.3.20.0000.00818.73
8.3.10.0030.00620.39
8.3.00.0080.00019.38
8.2.180.0100.01018.29
8.2.170.0100.00622.96
8.2.160.0090.00620.69
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0070.00020.87
8.2.110.0090.00021.13
8.2.100.0090.00317.84
8.2.90.0050.00319.26
8.2.80.0040.00419.28
8.2.70.0060.00317.75
8.2.60.0000.00817.93
8.2.50.0000.00818.07
8.2.40.0050.00318.22
8.2.30.0020.00518.03
8.2.20.0040.00717.57
8.2.10.0000.00717.75
8.2.00.0060.00617.75
8.1.280.0000.01525.92
8.1.270.0080.00023.99
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0040.00723.76
8.1.230.0080.00320.87
8.1.220.0000.00918.77
8.1.210.0040.00419.16
8.1.200.0060.00317.34
8.1.190.0050.00217.54
8.1.180.0040.00418.10
8.1.170.0000.00818.91
8.1.160.0100.00018.89
8.1.150.0040.00418.64
8.1.140.0080.00017.41
8.1.130.0030.00317.75
8.1.120.0040.00417.30
8.1.110.0040.00417.46
8.1.100.0030.00317.46
8.1.90.0040.00417.48
8.1.80.0070.00017.35
8.1.70.0000.00717.45
8.1.60.0060.00617.55
8.1.50.0000.00817.45
8.1.40.0000.00817.45
8.1.30.0000.00817.63
8.1.20.0000.00817.67
8.1.10.0040.00417.58
8.1.00.0000.00717.43
8.0.300.0020.00519.99
8.0.290.0050.00216.75
8.0.280.0030.00318.47
8.0.270.0030.00317.21
8.0.260.0070.00016.95
8.0.250.0070.00016.92
8.0.240.0050.00217.05
8.0.230.0040.00416.99
8.0.220.0070.00016.94
8.0.210.0060.00316.87
8.0.200.0030.00316.91
8.0.190.0080.00016.98
8.0.180.0030.00516.90
8.0.170.0030.00616.83
8.0.160.0020.00516.85
8.0.150.0030.00616.89
8.0.140.0000.00816.91
8.0.130.0000.00613.43
8.0.120.0040.00416.77
8.0.110.0080.00017.07
8.0.100.0080.00016.97
8.0.90.0040.00416.76
8.0.80.0030.01317.02
8.0.70.0000.00716.84
8.0.60.0040.00416.86
8.0.50.0040.00417.07
8.0.30.0110.00617.20
8.0.20.0090.01317.30
8.0.10.0080.00016.86
8.0.00.0100.01016.95
7.4.330.0000.00613.01
7.4.320.0000.00616.53
7.4.300.0000.00616.59
7.4.290.0000.00716.42
7.4.280.0030.00716.50
7.4.270.0060.00316.66
7.4.260.0000.00513.31
7.4.250.0000.00816.60
7.4.240.0070.00016.59
7.4.230.0030.00316.51
7.4.220.0130.01216.56
7.4.210.0060.00916.62
7.4.200.0000.00716.41
7.4.190.0040.00416.70
7.4.160.0160.00516.39
7.4.150.0130.00416.54
7.4.140.0070.01116.54
7.4.130.0100.00616.42
7.4.120.0050.01316.74
7.4.110.0100.00716.58
7.4.100.0120.00916.65
7.4.90.0100.00716.43
7.4.80.0030.01319.39
7.4.70.0090.01216.47
7.4.60.0070.01116.49
7.4.50.0030.00616.34
7.4.40.0090.00616.41
7.4.30.0060.00916.57
7.4.00.0070.01114.99
7.3.330.0060.00013.35
7.3.320.0060.00013.21
7.3.310.0070.00016.25
7.3.300.0030.00316.36
7.3.290.0070.00816.41
7.3.280.0080.01116.37
7.3.270.0090.00916.36
7.3.260.0060.01116.54
7.3.250.0050.01216.37
7.3.240.0070.01016.54
7.3.230.0090.00816.34
7.3.210.0170.00016.23
7.3.200.0120.00416.33
7.3.190.0140.00316.46
7.3.180.0060.01016.50
7.3.170.0060.00916.57
7.3.160.0100.01416.33
7.3.120.0070.00714.83
7.3.10.0080.00416.65
7.3.00.0080.00016.63
7.2.330.0030.01316.76
7.2.320.0100.00716.41
7.2.310.0150.00316.52
7.2.300.0120.00616.75
7.2.290.0100.01316.80
7.2.130.0000.01116.96
7.2.120.0040.00816.78
7.2.110.0040.00816.74
7.2.100.0030.01016.73
7.2.90.0000.01016.83
7.2.80.0060.00616.89
7.2.70.0090.00416.78
7.2.60.0050.00816.84
7.2.50.0080.00017.21
7.2.40.0000.01417.11
7.2.30.0030.00917.08
7.2.20.0030.01216.68
7.2.10.0040.01116.70
7.2.00.0100.00318.03
7.1.250.0000.01215.82
7.1.200.0000.00915.84
7.1.100.0030.00717.84
7.1.70.0000.01017.03
7.1.60.0030.01019.30
7.1.50.0070.01616.96
7.1.00.0000.07322.35
7.0.200.0000.00716.57
7.0.140.0030.07321.93
7.0.120.0070.07022.07
7.0.60.0200.07321.79
7.0.50.0030.07717.91
7.0.40.0130.04320.24
7.0.30.0270.08720.06
7.0.20.0300.07020.06
7.0.10.0070.07020.06
7.0.00.0130.05020.05
5.6.280.0100.06721.10
5.6.210.0030.04020.75
5.6.200.0070.04018.23
5.6.190.0070.08020.49
5.6.180.0270.05020.52
5.6.170.0300.05320.45
5.6.160.0030.04020.54
5.6.150.0170.06318.18
5.6.140.0030.04718.12
5.6.130.0030.04718.19
5.6.120.0070.07321.00
5.6.110.0100.06321.13
5.6.100.0130.08021.02
5.6.90.0100.06721.10
5.6.80.0100.03720.51
5.5.350.0100.07720.50
5.5.340.0030.03717.96
5.5.330.0130.08320.42
5.5.320.0100.07320.31
5.5.310.0200.04720.49
5.5.300.0170.07017.95
5.5.290.0170.05017.99
5.5.280.0100.03720.98
5.5.270.0100.04320.77
5.5.260.0070.06320.74
5.5.250.0030.07320.71
5.5.240.0130.08020.26
5.4.450.0070.06019.20
5.4.440.0100.03719.25
5.4.430.0130.07719.44
5.4.420.0000.05319.24
5.4.410.0070.07719.34
5.4.400.0130.07018.93
5.4.390.0170.03718.86
5.4.380.0030.04019.16
5.4.370.0130.06718.88
5.4.360.0030.07319.14
5.4.350.0070.07318.94
5.4.340.0100.05718.92
5.4.320.0070.07719.00
5.4.310.0000.04719.15
5.4.300.0070.08019.20
5.4.290.0070.03719.14
5.4.280.0070.03718.85
5.4.270.0130.06018.97
5.4.260.0130.04018.98
5.4.250.0070.05719.11
5.4.240.0100.07318.91
5.4.230.0130.07318.86
5.4.220.0130.03719.16
5.4.210.0030.05319.14
5.4.200.0070.07318.84
5.4.190.0130.04019.20
5.4.180.0030.05719.11
5.4.170.0000.06318.86
5.4.160.0000.08019.13
5.4.150.0070.04319.10
5.4.140.0170.04716.40
5.4.130.0030.05016.34
5.4.120.0100.07016.48
5.4.110.0070.04716.59
5.4.100.0100.07316.46
5.4.90.0070.05316.55
5.4.80.0100.04716.44
5.4.70.0000.07016.38
5.4.60.0030.04716.31
5.4.50.0030.05016.50
5.4.40.0070.07316.38
5.4.30.0070.07016.42
5.4.20.0030.04016.30
5.4.10.0070.07316.27
5.4.00.0100.04315.79
5.3.290.0030.08314.70
5.3.280.0000.08014.61
5.3.270.0030.07314.64
5.3.260.0030.05314.54
5.3.250.0070.06014.66
5.3.240.0130.06714.54
5.3.230.0000.04714.68
5.3.220.0130.05714.58
5.3.210.0100.06014.49
5.3.200.0030.07714.63
5.3.190.0030.05014.59
5.3.180.0030.07714.73
5.3.170.0070.05714.71
5.3.160.0070.04714.62
5.3.150.0030.08014.57
5.3.140.0070.05714.59
5.3.130.0030.07714.61
5.3.120.0100.04714.61
5.3.110.0100.04314.70
5.3.100.0070.04314.04
5.3.90.0130.03014.10
5.3.80.0070.03313.93
5.3.70.0100.03313.95
5.3.60.0070.04013.96
5.3.50.0070.05713.84
5.3.40.0070.04013.88
5.3.30.0030.05013.97
5.3.20.0030.07713.61
5.3.10.0070.03313.82
5.3.00.0070.03313.68
5.2.170.0100.05011.22
5.2.160.0100.03711.15
5.2.150.0070.02711.11
5.2.140.0000.04711.20
5.2.130.0100.05711.00
5.2.120.0000.05311.27
5.2.110.0000.06011.06
5.2.100.0030.02711.16
5.2.90.0000.06311.15
5.2.80.0030.04011.13
5.2.70.0000.03711.13
5.2.60.0030.03311.10
5.2.50.0030.04710.91
5.2.40.0030.04711.05
5.2.30.0030.05311.04
5.2.20.0070.04711.00
5.2.10.0000.04010.86
5.2.00.0070.02310.86
5.1.60.0000.03710.06
5.1.50.0100.04710.06
5.1.40.0070.04010.03
5.1.30.0070.03310.33
5.1.20.0130.03710.36
5.1.10.0070.02710.08
5.1.00.0100.04710.14
5.0.50.0030.0338.55
5.0.40.0030.0178.47
5.0.30.0000.0478.29
5.0.20.0070.0208.16
5.0.10.0070.0178.19
5.0.00.0100.0478.13
4.4.90.0100.0277.36
4.4.80.0000.0307.36
4.4.70.0030.0277.36
4.4.60.0070.0237.36
4.4.50.0000.0377.36
4.4.40.0000.0537.36
4.4.30.0030.0277.36
4.4.20.0030.0337.36
4.4.10.0000.0407.36
4.4.00.0070.0277.36
4.3.110.0030.0137.36
4.3.100.0070.0137.36
4.3.90.0030.0337.36
4.3.80.0030.0577.36
4.3.70.0030.0307.36
4.3.60.0030.0277.36
4.3.50.0000.0307.36
4.3.40.0000.0477.36
4.3.30.0000.0277.36
4.3.20.0000.0337.36
4.3.10.0070.0237.36
4.3.00.0030.0337.36

preferences:
52.41 ms | 401 KiB | 5 Q