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();

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.4.20.0130.00717.72
8.4.10.0030.00617.45
8.3.150.0160.00318.91
8.3.140.0120.00620.67
8.3.130.0000.00818.25
8.3.120.0100.00018.95
8.3.110.0040.00420.94
8.3.100.0070.00424.06
8.3.90.0030.00526.77
8.3.80.0040.00416.50
8.3.70.0090.01216.58
8.3.60.0150.00016.49
8.3.50.0130.00522.12
8.3.40.0100.01018.67
8.3.30.0150.00018.84
8.3.20.0000.00720.34
8.3.10.0080.00023.18
8.3.00.0050.00320.97
8.2.260.0090.00917.13
8.2.250.0040.00416.68
8.2.240.0000.00917.17
8.2.230.0030.00522.58
8.2.220.0090.00937.54
8.2.210.0080.00026.77
8.2.200.0030.00616.75
8.2.190.0140.00718.41
8.2.180.0090.00618.42
8.2.170.0120.00318.75
8.2.160.0100.00322.96
8.2.150.0050.00325.66
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00420.63
8.2.110.0030.00620.31
8.2.100.0080.00317.84
8.2.90.0090.00017.84
8.2.80.0000.00817.97
8.2.70.0050.00317.93
8.2.60.0070.00417.66
8.2.50.0060.00318.07
8.2.40.0080.00019.88
8.2.30.0040.00418.18
8.2.20.0000.00817.71
8.2.10.0000.00718.16
8.2.00.0000.00717.71
8.1.310.0060.01218.27
8.1.300.0060.00319.64
8.1.290.0040.00430.84
8.1.280.0040.01125.92
8.1.270.0040.00422.21
8.1.260.0050.00326.35
8.1.250.0000.00828.09
8.1.240.0090.00023.73
8.1.230.0000.01122.25
8.1.220.0000.00817.74
8.1.210.0060.00318.89
8.1.200.0060.00317.23
8.1.190.0060.00317.23
8.1.180.0000.00818.10
8.1.170.0000.00918.67
8.1.160.0040.00422.03
8.1.150.0000.00818.50
8.1.140.0040.00417.48
8.1.130.0030.00317.85
8.1.120.0040.00417.45
8.1.110.0040.00417.50
8.1.100.0000.00817.47
8.1.90.0000.00717.49
8.1.80.0050.00217.54
8.1.70.0030.00317.47
8.1.60.0030.00617.60
8.1.50.0040.00417.54
8.1.40.0090.00017.50
8.1.30.0060.00617.71
8.1.20.0000.00817.53
8.1.10.0030.00517.55
8.1.00.0000.00817.54
8.0.300.0000.00720.10
8.0.290.0050.00216.88
8.0.280.0050.00218.42
8.0.270.0000.00816.80
8.0.260.0000.00617.27
8.0.250.0030.00317.01
8.0.240.0000.00817.02
8.0.230.0070.00017.04
8.0.220.0000.00716.83
8.0.210.0050.00316.76
8.0.200.0040.00416.88
8.0.190.0000.00816.90
8.0.180.0050.00216.90
8.0.170.0000.00716.98
8.0.160.0000.00716.96
8.0.150.0000.00916.81
8.0.140.0040.00416.86
8.0.130.0000.00513.40
8.0.120.0080.00016.93
8.0.110.0070.00016.95
8.0.100.0000.00716.86
8.0.90.0070.00017.03
8.0.80.0090.01216.81
8.0.70.0060.00316.80
8.0.60.0030.00516.79
8.0.50.0000.00716.77
8.0.30.0130.00617.08
8.0.20.0110.00717.40
8.0.10.0000.00717.04
8.0.00.0120.00516.93
7.4.330.0020.00215.06
7.4.320.0000.00616.41
7.4.300.0070.00016.53
7.4.290.0000.00716.62
7.4.280.0040.00416.43
7.4.270.0000.00716.63
7.4.260.0000.00716.58
7.4.250.0000.00716.57
7.4.240.0030.00416.55
7.4.230.0090.00016.59
7.4.220.0140.00416.70
7.4.210.0040.01216.62
7.4.200.0040.00416.59
7.4.160.0150.00616.50
7.4.150.0090.00917.40
7.4.140.0120.00717.86
7.4.130.0100.00916.46
7.4.120.0090.00716.50
7.4.110.0040.01916.66
7.4.100.0060.01016.59
7.4.90.0100.00716.41
7.4.80.0080.01119.39
7.4.70.0030.01716.57
7.4.60.0100.00716.43
7.4.50.0000.00416.31
7.4.40.0060.01716.41
7.4.30.0130.00316.48
7.4.00.0070.01114.96
7.3.330.0030.00313.33
7.3.320.0060.00013.09
7.3.310.0030.00316.35
7.3.300.0030.00316.32
7.3.290.0080.00716.32
7.3.280.0090.00816.26
7.3.270.0140.00417.40
7.3.260.0110.00616.55
7.3.250.0110.00816.41
7.3.240.0140.00516.38
7.3.230.0090.01216.39
7.3.210.0180.00016.25
7.3.200.0130.00719.39
7.3.190.0090.01216.31
7.3.180.0150.00616.29
7.3.170.0040.01216.52
7.3.160.0120.00816.41
7.3.120.0080.01014.74
7.3.110.0060.01114.57
7.3.100.0100.00514.71
7.3.90.0050.00914.86
7.3.80.0090.00514.76
7.3.70.0100.00614.65
7.3.60.0050.00814.85
7.3.50.0060.00714.76
7.3.40.0080.00614.75
7.3.30.0070.00914.68
7.3.20.0080.00716.03
7.3.10.0050.00716.23
7.3.00.0070.00616.20
7.2.330.0030.01516.70
7.2.320.0060.01216.90
7.2.310.0100.00716.84
7.2.300.0040.01316.30
7.2.290.0070.01516.80
7.2.250.0080.01015.15
7.2.240.0050.01415.16
7.2.230.0070.00715.17
7.2.220.0070.00714.80
7.2.210.0060.01114.95
7.2.200.0040.01115.05
7.2.190.0070.00914.95
7.2.180.0090.00515.05
7.2.170.0060.01014.86
7.2.160.0060.01015.03
7.2.150.0060.00616.00
7.2.140.0090.00616.12
7.2.130.0070.00716.59
7.2.120.0060.01016.50
7.2.110.0060.00716.43
7.2.100.0060.00916.48
7.2.90.0050.00916.54
7.2.80.0070.00816.51
7.2.70.0080.00616.45
7.2.60.0050.00916.53
7.2.50.0060.00716.51
7.2.40.0070.00716.46
7.2.30.0080.00716.56
7.2.20.0050.00816.47
7.2.10.0080.00716.36
7.2.00.0060.00917.09
7.1.330.0050.01115.79
7.1.320.0080.00715.19
7.1.310.0090.00615.09
7.1.300.0100.00715.13
7.1.290.0090.00714.98
7.1.280.0050.01015.22
7.1.270.0060.00815.20
7.1.260.0080.00715.06
7.1.250.0100.00915.26
7.1.240.0080.00814.98
7.1.230.0110.00514.86
7.1.220.0070.00814.72
7.1.210.0040.01014.88
7.1.200.0080.00715.14
7.1.190.0090.00314.81
7.1.180.0060.00714.97
7.1.170.0080.00814.78
7.1.160.0020.01214.90
7.1.150.0030.00814.95
7.1.140.0110.00514.72
7.1.130.0050.01014.80
7.1.120.0080.00514.91
7.1.110.0060.00915.00
7.1.100.0030.01015.98
7.1.90.0070.00714.85
7.1.80.0120.00414.90
7.1.70.0050.00815.58
7.1.60.0070.00915.65
7.1.50.0020.01215.62
7.1.40.0070.00815.32
7.1.30.0050.00915.39
7.1.20.0040.01215.45
7.1.10.0060.00815.47
7.1.00.0060.01215.50
7.0.330.0090.00813.58
7.0.320.0060.00713.18
7.0.310.0060.00613.50
7.0.300.0060.01113.35
7.0.290.0080.01113.40
7.0.280.0090.00413.43
7.0.270.0180.00313.49
7.0.260.0110.00613.18
7.0.250.0090.01513.21
7.0.240.0040.01113.47
7.0.230.0070.00713.34
7.0.220.0110.00413.27
7.0.210.0070.00713.39
7.0.200.0070.00914.95
7.0.190.0020.00815.11
7.0.180.0050.00714.67
7.0.170.0040.01014.80
7.0.160.0050.00714.85
7.0.150.0080.00714.78
7.0.140.0040.01114.81
7.0.130.0000.01114.83
7.0.120.0150.00615.04
7.0.110.0090.00815.13
7.0.100.0080.00514.63
7.0.90.0070.00814.83
7.0.80.0060.00614.90
7.0.70.0030.01114.73
7.0.60.0020.00915.02
7.0.50.0060.00714.95
7.0.40.0060.00714.51
7.0.30.0040.00714.42
7.0.20.0060.00514.45
7.0.10.0040.00614.49
7.0.00.0070.00614.30
5.6.400.0080.00814.48
5.6.390.0100.00514.25
5.6.380.0040.01114.16
5.6.370.0080.00814.14
5.6.360.0090.00614.02
5.6.350.0140.00314.11
5.6.340.0140.00314.27
5.6.330.0110.00514.51
5.6.320.0080.00814.25
5.6.310.0090.01214.06
5.6.300.0030.03917.42
5.6.290.0110.03417.50
5.6.280.0050.04417.75
5.6.270.0040.03017.36
5.6.260.0040.04317.60
5.6.250.0130.02617.50
5.6.240.0050.02917.75
5.6.230.0080.04417.51
5.6.220.0100.03517.50
5.6.210.0070.02217.71
5.6.200.0060.03417.44
5.6.190.0060.04517.54
5.6.180.0060.02517.63
5.6.170.0120.01917.48
5.6.160.0070.02917.51
5.6.150.0060.02517.51
5.6.140.0060.04117.56
5.6.130.0100.02717.53
5.6.120.0080.04317.50
5.6.110.0050.02917.49
5.6.100.0060.04817.55
5.6.90.0080.03817.42
5.6.80.0040.03317.35
5.6.70.0060.02317.18
5.6.60.0060.04317.04
5.6.50.0050.03017.20
5.6.40.0100.03417.10
5.6.30.0070.03617.26
5.6.20.0050.04617.27
5.6.10.0080.02217.23
5.6.00.0050.02617.32
5.5.380.0050.02315.78
5.5.370.0090.02215.73
5.5.360.0080.03715.86
5.5.350.0070.02315.85
5.5.340.0050.02916.13
5.5.330.0040.02916.04
5.5.320.0090.02015.96
5.5.310.0100.02516.09
5.5.300.0080.02216.02
5.5.290.0130.03116.21
5.5.280.0060.02816.16
5.5.270.0040.02616.01
5.5.260.0070.02815.96
5.5.250.0140.03815.78
5.5.240.0090.03015.57
5.5.230.0090.02215.61
5.5.220.0070.04815.70
5.5.210.0030.04215.75
5.5.200.0080.04315.46
5.5.190.0050.02615.80
5.5.180.0050.02615.80
5.5.170.0060.01014.16
5.5.160.0030.02615.75
5.5.150.0050.02915.78
5.5.140.0030.04516.00
5.5.130.0020.04515.69
5.5.120.0110.03415.76
5.5.110.0030.02615.57
5.5.100.0020.04615.70
5.5.90.0050.04315.86
5.5.80.0080.03815.87
5.5.70.0080.02515.62
5.5.60.0070.03615.71
5.5.50.0080.04215.85
5.5.40.0100.03715.82
5.5.30.0050.02715.71
5.5.20.0050.02415.85
5.5.10.0030.02615.47
5.5.00.0060.04315.54
5.4.450.0050.04515.04
5.4.440.0020.03914.99
5.4.430.0080.04215.25
5.4.420.0040.04215.01
5.4.410.0030.04215.07
5.4.400.0000.03214.94
5.4.390.0050.04015.10
5.4.380.0040.04414.96
5.4.370.0030.04515.09
5.4.360.0080.02814.94
5.4.350.0070.02014.88
5.4.340.0070.02014.88
5.4.330.0100.00010.92
5.4.320.0060.01914.89
5.4.310.0060.03814.97
5.4.300.0060.04115.00
5.4.290.0030.04115.10
5.4.280.0070.02315.04
5.4.270.0070.03515.11
5.4.260.0020.02814.97
5.4.250.0080.03215.10
5.4.240.0030.02814.92
5.4.230.0040.02414.88
5.4.220.0070.01915.06
5.4.210.0050.02215.00
5.4.200.0050.04015.03
5.4.190.0030.02414.90
5.4.180.0050.02314.82
5.4.170.0050.04115.10
5.4.160.0020.04714.94
5.4.150.0080.01915.10
5.4.140.0100.03513.87
5.4.130.0040.02413.94
5.4.120.0070.01713.78
5.4.110.0050.03613.77
5.4.100.0030.04013.81
5.4.90.0060.04613.79
5.4.80.0020.02813.81
5.4.70.0090.03513.83
5.4.60.0090.03113.81
5.4.50.0040.03813.76
5.4.40.0040.04413.85
5.4.30.0020.03513.73
5.4.20.0070.02813.83
5.4.10.0060.03013.84
5.4.00.0000.04013.47
5.3.290.0060.02213.04
5.3.280.0090.03312.97
5.3.270.0050.03012.88
5.3.260.0110.03412.99
5.3.250.0090.04012.98
5.3.240.0080.04112.95
5.3.230.0100.03312.97
5.3.220.0090.03312.92
5.3.210.0040.04112.92
5.3.200.0090.03912.96
5.3.190.0070.03912.86
5.3.180.0070.04012.98
5.3.170.0080.03912.92
5.3.160.0080.02813.01
5.3.150.0080.03813.05
5.3.140.0040.04013.03
5.3.130.0050.04312.89
5.3.120.0080.04213.00
5.3.110.0070.02012.89
5.3.100.0080.03913.00
5.3.90.0080.02413.02
5.3.80.0040.02312.96
5.3.70.0040.02412.97
5.3.60.0110.03112.98
5.3.50.0070.02012.88
5.3.40.0120.02712.98
5.3.30.0060.02112.93
5.3.20.0050.02112.87
5.3.10.0080.03712.88
5.3.00.0040.03712.88
5.2.170.0030.01912.46
5.2.160.0090.02912.46
5.2.150.0080.03212.46
5.2.140.0070.01812.46
5.2.130.0050.01612.46
5.2.120.0020.03212.46
5.2.110.0050.02012.46
5.2.100.0040.01912.46
5.2.90.0090.03212.46
5.2.80.0080.03212.46
5.2.70.0080.01512.46
5.2.60.0050.03312.46
5.2.50.0020.03412.46
5.2.40.0050.02912.46
5.2.30.0040.03312.46
5.2.20.0060.03412.46
5.2.10.0050.03012.46
5.2.00.0070.02012.46
5.1.60.0050.03212.46
5.1.50.0030.01912.46
5.1.40.0040.02212.46
5.1.30.0030.01812.46
5.1.20.0070.01312.46
5.1.10.0000.02212.46
5.1.00.0020.01712.46
5.0.50.0020.01512.46
5.0.40.0030.01312.46
5.0.30.0020.01912.46
5.0.20.0050.00912.46
5.0.10.0020.02212.46
5.0.00.0060.02212.46
4.4.90.0020.01312.46
4.4.80.0050.01912.46
4.4.70.0050.01812.46
4.4.60.0030.01312.46
4.4.50.0080.01512.46
4.4.40.0070.02312.46
4.4.30.0020.02012.46
4.4.20.0000.01712.46
4.4.10.0020.01312.46
4.4.00.0020.01612.46
4.3.110.0010.01012.46
4.3.100.0050.00612.46
4.3.90.0060.00612.46
4.3.80.0080.02612.46
4.3.70.0000.01212.46
4.3.60.0030.00912.46
4.3.50.0010.01212.46
4.3.40.0040.03112.46
4.3.30.0030.01412.46
4.3.20.0030.00912.46
4.3.10.0000.01112.46
4.3.00.0030.01612.46

preferences:
72.83 ms | 403 KiB | 5 Q