3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foobar { function test() { $bar = "nasty"; $closure = function($foo) use ($bar) {}; $reflect = new ReflectionFunction($closure); //print_r($reflect); print_r($reflect->getClosureThis()); print_r($reflect->getClosureScopeClass()); } } (new Foobar())->test();
based on GBHBq

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.1.70.0030.00717.19
7.1.60.0070.01819.61
7.1.50.0030.02016.96
7.1.00.0030.07722.37
7.0.200.0000.00816.28
7.0.140.0030.07321.95
7.0.60.0170.07720.05
7.0.50.0100.04717.96
7.0.40.0130.06320.20
7.0.30.0230.04720.23
7.0.20.0400.07320.09
7.0.10.0300.07720.23
7.0.00.0130.08020.22
5.6.280.0070.07020.86
5.6.210.0100.04320.63
5.6.200.0070.08018.18
5.6.190.0030.06320.55
5.6.180.0200.04020.47
5.6.170.0230.04320.56
5.6.160.0130.06720.71
5.6.150.0100.07318.14
5.6.140.0100.06018.18
5.6.130.0100.03318.27
5.6.120.0030.04021.05
5.6.110.0130.05320.90
5.6.100.0000.05321.14
5.6.90.0130.07720.96
5.6.80.0070.03720.38
5.6.70.4600.03720.54
5.5.350.0130.08020.45
5.5.340.0100.07017.96
5.5.330.0000.06320.14
5.5.320.0430.07320.34
5.5.310.0170.04320.36
5.5.300.0070.05017.97
5.5.290.0030.07017.97
5.5.280.0000.08720.97
5.5.270.0030.04720.63
5.5.260.0000.04720.86
5.5.250.0100.07720.78
5.5.240.4270.03720.16
5.4.450.0730.03719.37
5.4.440.0870.03319.41
5.4.430.0830.06719.54
5.4.420.1030.07019.31
5.4.410.0070.08019.35
5.4.400.0170.05019.22
5.4.390.0130.05719.22
5.4.380.0170.06018.78
5.4.370.0300.04718.51
5.4.360.0170.05718.77
5.4.350.0370.04318.57
5.4.340.0400.06318.73
5.4.320.0040.04012.51
5.4.310.0050.03812.50
5.4.300.0040.03812.51
5.4.290.0080.03512.50
5.4.280.0040.03612.39
5.4.270.0050.04112.40
5.4.260.0070.03612.40
5.4.250.0050.04212.39
5.4.240.0060.03612.40
5.4.230.0060.03712.39
5.4.220.0120.04712.39
5.4.210.0070.03512.39
5.4.200.0020.04112.39
5.4.190.0040.03812.38
5.4.180.0100.03512.39
5.4.170.0070.03912.40
5.4.160.0070.03612.39
5.4.150.0080.04112.39
5.4.140.0080.06912.07
5.4.130.0140.05812.06
5.4.120.0220.06812.02
5.4.110.0150.07612.02
5.4.100.0140.10212.01
5.4.90.0120.05712.02
5.4.80.0120.05612.02
5.4.70.0160.05712.01
5.4.60.0130.05512.02
5.4.50.0130.04712.02
5.4.40.0090.05912.00
5.4.30.0110.05012.00
5.4.20.0130.04612.00
5.4.10.0110.03712.00
5.4.00.0150.05311.49
5.3.290.0080.05012.80
5.3.280.0090.04112.71
5.3.270.0070.04812.72
5.3.260.0120.05112.72
5.3.250.0100.04612.72
5.3.240.0150.04912.72
5.3.230.0100.03912.71
5.3.220.0100.04712.68
5.3.210.0110.05212.68
5.3.200.0130.04912.68
5.3.190.0120.04512.68
5.3.180.0060.04512.68
5.3.170.0110.04812.67
5.3.160.0060.03912.67
5.3.150.0060.05212.67
5.3.140.0080.04212.66
5.3.130.0090.04612.66
5.3.120.0140.04312.65
5.3.110.0090.04312.66
5.3.100.0060.03912.13
5.3.90.0100.04912.11
5.3.80.0080.03912.10
5.3.70.0190.06512.10
5.3.60.0060.05012.08
5.3.50.0090.03912.03
5.3.40.0100.04812.04
5.3.30.0120.04111.99
5.3.20.0070.03811.78
5.3.10.0080.04111.73
5.3.00.0100.04811.73
5.2.170.0060.0329.23
5.2.160.0080.0409.23
5.2.150.0060.0319.23
5.2.140.0070.0439.22
5.2.130.0040.0379.18
5.2.120.0090.0289.18
5.2.110.0080.0279.18
5.2.100.0060.0299.18
5.2.90.0060.0299.18
5.2.80.0050.0319.17
5.2.70.0070.0389.17
5.2.60.0050.0319.13
5.2.50.0090.0319.10
5.2.40.0160.0389.08
5.2.30.0160.0279.05
5.2.20.0070.0319.04
5.2.10.0160.0268.95
5.2.00.0160.0398.81
5.1.60.0120.0308.09
5.1.50.0110.0368.09
5.1.40.0060.0308.07
5.1.30.0100.0478.42
5.1.20.0090.0358.44
5.1.10.0090.0388.17
5.1.00.0040.0388.17
5.0.50.0040.0296.64
5.0.40.0030.0236.50
5.0.30.0040.0386.31
5.0.20.0040.0246.28
5.0.10.0100.0236.25
5.0.00.0040.0366.25
4.4.90.0070.0154.78
4.4.80.0030.0204.76
4.4.70.0040.0224.76
4.4.60.0030.0194.76
4.4.50.0030.0204.77
4.4.40.0030.0324.70
4.4.30.0030.0234.75
4.4.20.0030.0194.84
4.4.10.0060.0154.85
4.4.00.0050.0244.76
4.3.110.0030.0194.67
4.3.100.0050.0204.66
4.3.90.0030.0224.63
4.3.80.0050.0294.58
4.3.70.0040.0154.63
4.3.60.0010.0254.62
4.3.50.0030.0174.63
4.3.40.0040.0314.54
4.3.30.0010.0193.30
4.3.20.0070.0123.27
4.3.10.0010.0183.24
4.3.00.0070.01713.57