3v4l.org

run code in 200+ 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)
7.4.00.0070.01114.96
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.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