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; }; } } $foo = new Foo(); $service = new FriendOfFoo(); // $closure = $service->doSomething($foo)->bindTo(null, $foo); $closure = $service->doSomething($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.0120.00316.48
8.3.50.0100.00521.99
8.3.40.0000.01518.85
8.3.30.0040.01119.10
8.3.20.0070.00020.21
8.3.10.0000.00821.76
8.3.00.0050.00318.00
8.2.180.0120.00918.41
8.2.170.0110.00322.96
8.2.160.0100.00720.53
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0070.00020.87
8.2.110.0070.00322.16
8.2.100.0080.00317.91
8.2.90.0030.00519.05
8.2.80.0050.00317.97
8.2.70.0090.00017.50
8.2.60.0000.00817.68
8.2.50.0040.00418.07
8.2.40.0040.00418.34
8.2.30.0040.00418.39
8.2.20.0040.00417.77
8.2.10.0000.00718.07
8.2.00.0040.00417.63
8.1.280.0100.01025.92
8.1.270.0000.00823.82
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0050.00523.86
8.1.230.0040.00717.42
8.1.220.0030.00617.74
8.1.210.0050.00318.77
8.1.200.0090.00317.36
8.1.190.0030.00517.22
8.1.180.0000.00818.10
8.1.170.0000.00818.50
8.1.160.0070.00021.98
8.1.150.0000.00718.94
8.1.140.0000.00717.42
8.1.130.0030.00317.75
8.1.120.0050.00317.43
8.1.110.0030.00617.50
8.1.100.0040.00417.38
8.1.90.0000.00817.47
8.1.80.0020.00517.38
8.1.70.0050.00217.43
8.1.60.0030.00517.56
8.1.50.0000.00817.46
8.1.40.0080.00017.54
8.1.30.0030.00517.72
8.1.20.0040.00417.49
8.1.10.0000.00717.57
8.1.00.0030.00617.45
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0020.00518.44
8.0.270.0030.00317.16
8.0.260.0060.00017.13
8.0.250.0030.00317.04
8.0.240.0030.00316.99
8.0.230.0030.00316.93
8.0.220.0020.00516.95
8.0.210.0030.00316.95
8.0.200.0060.00316.95
8.0.190.0030.00316.92
8.0.180.0000.00816.96
8.0.170.0030.00516.86
8.0.160.0070.00016.81
8.0.150.0040.00416.85
8.0.140.0080.00016.89
8.0.130.0000.00713.44
8.0.120.0040.00416.98
8.0.110.0020.00516.95
8.0.100.0040.00417.01
8.0.90.0050.00316.77
8.0.80.0060.00916.92
8.0.70.0050.00216.90
8.0.60.0040.00416.80
8.0.50.0040.00416.84
8.0.30.0110.00817.04
8.0.20.0120.00917.40
8.0.10.0040.00416.96
8.0.00.0080.01116.83
7.4.330.0050.00015.14
7.4.320.0000.00716.60
7.4.300.0000.00616.48
7.4.290.0000.00816.51
7.4.280.0050.00316.50
7.4.270.0070.00016.59
7.4.260.0070.00316.50
7.4.250.0000.00716.41
7.4.240.0000.00716.55
7.4.230.0000.00716.39
7.4.220.0070.01316.57
7.4.210.0060.00816.48
7.4.200.0030.00316.49
7.4.160.0120.00316.61
7.4.150.0140.00717.40
7.4.140.0110.00917.86
7.4.130.0070.01016.44
7.4.120.0150.00716.46
7.4.110.0060.01216.40
7.4.100.0140.00716.64
7.4.90.0000.01716.51
7.4.80.0130.00419.39
7.4.70.0060.01016.47
7.4.60.0060.01016.48
7.4.50.0020.00616.42
7.4.40.0080.00816.28
7.4.30.0080.00816.47
7.4.00.0040.01114.77
7.3.330.0060.00013.14
7.3.320.0030.00313.43
7.3.310.0070.00016.38
7.3.300.0030.00316.36
7.3.290.0090.00616.27
7.3.280.0080.00916.37
7.3.270.0090.00917.40
7.3.260.0080.01116.34
7.3.250.0100.01016.50
7.3.240.0070.01016.50
7.3.230.0030.01316.59
7.3.210.0100.00716.36
7.3.200.0080.01219.39
7.3.190.0130.00916.28
7.3.180.0120.00316.29
7.3.170.0060.01016.35
7.3.160.0000.01616.44
7.3.120.0060.00914.86
7.2.330.0030.01616.78
7.2.320.0080.01216.64
7.2.310.0070.01016.36
7.2.300.0080.00816.36
7.2.290.0000.01616.34
7.2.60.0070.01117.08
7.2.00.0060.00919.49
7.1.200.0030.00715.82
7.1.100.0030.01018.34
7.1.70.0000.00917.25
7.1.60.0030.02019.70
7.1.50.0090.00916.94
7.1.00.0000.08022.54
7.0.200.0040.00416.76
7.0.140.0000.07322.21
7.0.60.0100.03319.86
7.0.50.0000.05717.86
7.0.40.0200.05020.20
7.0.30.0230.04320.07
7.0.20.0200.06020.26
7.0.10.0000.04720.09
7.0.00.0070.04320.19
5.6.280.0000.07721.08
5.6.210.0000.05720.51
5.6.200.0000.04318.16
5.6.190.0070.04720.39
5.6.180.0400.07020.68
5.6.170.0200.05320.62
5.6.160.0030.04020.45
5.6.150.0130.06318.25
5.6.140.0070.06018.12
5.6.130.0100.04718.18
5.6.120.0070.07321.02
5.6.110.0030.04321.11
5.6.100.0030.04321.09
5.6.90.0030.08720.98
5.6.80.0030.08020.36
5.5.350.0230.08020.30
5.5.340.0070.07317.96
5.5.330.0000.05020.27
5.5.320.0070.04720.27
5.5.310.0570.04320.51
5.5.300.0100.08318.01
5.5.290.0100.05017.99
5.5.280.0030.08020.69
5.5.270.0070.04020.97
5.5.260.0100.03320.77
5.5.250.0030.06720.59
5.5.240.0070.07720.07
5.4.450.0870.07319.39
5.4.440.0870.06319.70
5.4.430.0900.06019.41
5.4.420.0800.06019.47
5.4.410.0030.05718.97
5.4.400.0270.05018.75
5.4.390.0330.06018.59
5.4.380.0230.05018.76
5.4.370.0070.03718.70
5.4.360.0030.03718.50
5.4.350.0110.04912.02
5.4.340.0100.04512.02
5.4.320.0030.04412.50
5.4.310.0040.03812.50
5.4.300.0050.03812.51
5.4.290.0070.04312.50
5.4.280.0050.04712.40
5.4.270.0070.04112.40
5.4.260.0090.04212.40
5.4.250.0120.03612.40
5.4.240.0040.03812.40
5.4.230.0080.03712.39
5.4.220.0090.04112.39
5.4.210.0140.04212.39
5.4.200.0120.04712.39
5.4.190.0140.04512.39
5.4.180.0100.04312.39
5.4.170.0040.03812.39
5.4.160.0080.04012.39
5.4.150.0100.04612.39
5.4.140.0200.03812.07
5.4.130.0090.03712.06
5.4.120.0040.03812.02
5.4.110.0050.03912.01
5.4.100.0050.03812.01
5.4.90.0050.03912.02
5.4.80.0050.03812.02
5.4.70.0040.03712.01
5.4.60.0050.03612.01
5.4.50.0070.03612.01
5.4.40.0040.03712.00
5.4.30.0060.03512.00
5.4.20.0080.03312.00
5.4.10.0070.03512.00
5.4.00.0080.03411.49
5.3.290.0100.03812.80
5.3.280.0060.03712.71
5.3.270.0060.03912.72
5.3.260.0060.03912.71
5.3.250.0050.03712.72
5.3.240.0050.03812.72
5.3.230.0040.04012.70
5.3.220.0060.03712.68
5.3.210.0070.03912.68
5.3.200.0050.03712.68
5.3.190.0080.03612.68
5.3.180.0050.03712.68
5.3.170.0080.03912.67
5.3.160.0080.05112.67
5.3.150.0060.03912.67
5.3.140.0080.03412.66
5.3.130.0060.03912.65
5.3.120.0020.04212.65
5.3.110.0070.03812.66
5.3.100.0030.03912.13
5.3.90.0070.04912.12
5.3.80.0070.04412.10
5.3.70.0040.03712.10
5.3.60.0080.04312.08
5.3.50.0090.03212.04
5.3.40.0070.03912.04
5.3.30.0050.03611.99
5.3.20.0100.03111.77
5.3.10.0050.03711.75
5.3.00.0090.03311.73
5.2.170.0030.0329.22
5.2.160.0040.0359.22
5.2.150.0020.0329.22
5.2.140.0040.0329.21
5.2.130.0040.0309.18
5.2.120.0060.0279.18
5.2.110.0040.0309.19
5.2.100.0030.0309.19
5.2.90.0030.0319.19
5.2.80.0040.0319.18
5.2.70.0040.0319.18
5.2.60.0070.0349.14
5.2.50.0040.0429.11
5.2.40.0060.0309.07
5.2.30.0060.0289.06
5.2.20.0060.0289.04
5.2.10.0080.0298.94
5.2.00.0040.0328.82
5.1.60.0050.0228.09
5.1.50.0050.0238.09
5.1.40.0060.0228.07
5.1.30.0060.0258.43
5.1.20.0040.0278.44
5.1.10.0030.0278.16
5.1.00.0030.0278.16
5.0.50.0020.0226.64
5.0.40.0020.0216.50
5.0.30.0040.0316.32
5.0.20.0010.0216.29
5.0.10.0030.0196.26
5.0.00.0060.0286.25
4.4.90.0020.0164.78
4.4.80.0030.0154.75
4.4.70.0040.0144.75
4.4.60.0040.0134.75
4.4.50.0010.0174.77
4.4.40.0020.0264.71
4.4.30.0010.0174.76
4.4.20.0050.0134.84
4.4.10.0030.0154.85
4.4.00.0030.0244.76
4.3.110.0040.0144.67
4.3.100.0020.0164.66
4.3.90.0030.0144.64
4.3.80.0030.0244.59
4.3.70.0010.0174.63
4.3.60.0030.0144.63
4.3.50.0030.0154.63
4.3.40.0030.0234.54
4.3.30.0020.0163.30
4.3.20.0040.0143.28
4.3.10.0000.0173.24
4.3.00.0000.0238.54

preferences:
41.63 ms | 401 KiB | 5 Q