3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(ReflectionFunctionAbstract $r) { var_dump($r->isClosure()); $dc = $r->getDeclaringClass(); var_dump($dc ? $dc->getName() : 'no declaring class'); $csc = $r->getClosureScopeClass(); var_dump($csc ? $csc->getName() : 'no closure scope class'); echo "\n\n"; } class C { function f() { return function($p) {}; } } $c = new C; $cl = $c->f(); // instantiate ReflectionFunction directly on closure $rf = new ReflectionFunction($cl); test($rf); // get ReflectionFunction via one of the initial ReflectionFunction's ReflectionParameter objects $rps = $rf->getParameters(); $rp = $rps[0]; test($rp->getDeclaringFunction());

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.0090.00918.68
8.3.50.0110.00922.00
8.3.40.0070.00718.98
8.3.30.0090.00619.07
8.3.20.0040.00420.18
8.3.10.0040.00420.23
8.3.00.0060.00319.25
8.2.180.0130.00616.88
8.2.170.0170.00322.96
8.2.160.0070.00720.39
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0040.00420.98
8.2.110.0000.00920.53
8.2.100.0070.01117.72
8.2.90.0000.00819.21
8.2.80.0030.00517.97
8.2.70.0040.00417.63
8.2.60.0040.00418.04
8.2.50.0000.01018.07
8.2.40.0040.00418.28
8.2.30.0040.00419.54
8.2.20.0030.00517.77
8.2.10.0030.00617.97
8.2.00.0000.00817.72
8.1.280.0100.00725.92
8.1.270.0030.00623.96
8.1.260.0070.00026.35
8.1.250.0030.00628.09
8.1.240.0080.00323.83
8.1.230.0040.00819.15
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0080.00617.22
8.1.190.0030.00617.35
8.1.180.0000.00818.10
8.1.170.0090.00018.51
8.1.160.0050.00322.09
8.1.150.0050.00218.99
8.1.140.0040.00717.42
8.1.130.0030.00317.78
8.1.120.0040.00417.51
8.1.110.0030.00517.49
8.1.100.0030.00517.40
8.1.90.0030.00517.51
8.1.80.0080.00017.52
8.1.70.0040.00417.47
8.1.60.0040.00417.63
8.1.50.0080.00017.57
8.1.40.0070.00017.50
8.1.30.0040.00417.67
8.1.20.0040.00417.75
8.1.10.0000.00717.61
8.1.00.0000.00917.41
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00718.33
8.0.270.0030.00517.22
8.0.260.0000.00617.24
8.0.250.0030.00317.06
8.0.240.0000.00816.99
8.0.230.0050.00216.81
8.0.220.0000.00816.89
8.0.210.0030.00316.88
8.0.200.0000.00616.94
8.0.190.0040.00717.07
8.0.180.0080.00016.92
8.0.170.0040.00416.89
8.0.160.0070.00017.00
8.0.150.0000.00716.97
8.0.140.0000.00816.95
8.0.130.0000.00613.40
8.0.120.0090.00017.00
8.0.110.0040.00417.03
8.0.100.0000.00717.03
8.0.90.0040.00416.84
8.0.80.0120.00317.01
8.0.70.0040.00416.86
8.0.60.0080.00016.88
8.0.50.0020.00517.09
8.0.30.0110.01216.98
8.0.20.0150.00917.40
8.0.10.0050.00316.98
8.0.00.0120.00716.94
7.4.330.0020.00215.00
7.4.320.0030.00316.62
7.4.300.0030.00316.60
7.4.290.0000.00716.53
7.4.280.0040.00416.63
7.4.270.0030.00316.61
7.4.260.0060.00316.51
7.4.250.0030.00516.62
7.4.240.0040.00416.53
7.4.230.0030.00316.60
7.4.220.0090.01716.46
7.4.210.0070.01016.57
7.4.200.0030.00516.45
7.4.160.0000.01616.72
7.4.150.0080.00817.40
7.4.140.0110.01117.86
7.4.130.0150.00616.56
7.4.120.0110.00916.69
7.4.110.0130.00316.46
7.4.100.0060.01116.50
7.4.90.0110.00716.69
7.4.80.0090.00919.39
7.4.70.0060.00916.54
7.4.60.0030.01416.65
7.4.50.0080.00016.45
7.4.40.0060.01116.53
7.4.30.0070.01016.49
7.4.10.0100.00614.77
7.4.00.0070.00815.09
7.3.330.0000.00513.21
7.3.320.0020.00213.38
7.3.310.0000.00716.43
7.3.300.0070.00016.42
7.3.290.0080.00516.39
7.3.280.0090.00716.39
7.3.270.0050.01417.40
7.3.260.0070.01016.37
7.3.250.0050.01116.39
7.3.240.0120.00616.51
7.3.230.0060.01016.41
7.3.210.0090.00916.34
7.3.200.0060.01219.39
7.3.190.0070.01116.42
7.3.180.0130.00316.30
7.3.170.0070.01016.38
7.3.160.0030.01616.37
7.3.130.0060.01214.73
7.3.120.0030.01414.58
7.3.110.0030.01614.74
7.3.100.0040.01415.02
7.3.90.0000.00915.06
7.3.80.0140.00314.86
7.3.70.0030.01214.77
7.3.60.0120.00014.48
7.3.50.0030.01014.84
7.3.40.0080.00614.82
7.3.30.0070.00714.35
7.3.20.0060.00916.70
7.3.10.0090.00616.67
7.3.00.0050.00316.30
7.2.330.0080.00816.54
7.2.320.0070.01116.48
7.2.310.0110.00616.64
7.2.300.0090.00916.64
7.2.290.0030.01316.79
7.2.260.0110.00714.99
7.2.250.0030.01015.05
7.2.240.0090.00615.08
7.2.230.0040.01314.85
7.2.220.0040.01114.86
7.2.210.0120.00615.12
7.2.200.0040.01214.93
7.2.190.0040.00714.98
7.2.180.0070.00715.08
7.2.170.0030.01015.06
7.2.160.0060.00615.09
7.2.150.0070.00716.79
7.2.140.0060.00816.77
7.2.130.0070.00716.84
7.2.120.0070.00716.81
7.2.110.0070.00716.69
7.2.100.0070.00716.74
7.2.90.0060.00616.78
7.2.80.0000.01416.63
7.2.70.0070.00716.75
7.2.60.0030.01316.86
7.2.50.0030.01416.96
7.2.40.0000.01216.77
7.2.30.0090.00616.84
7.2.20.0060.00616.79
7.2.10.0120.00016.72
7.2.00.0040.01018.06
7.1.330.0060.00615.77
7.1.320.0070.00415.79
7.1.310.0110.00415.52
7.1.300.0090.00015.77
7.1.290.0030.00615.56
7.1.280.0000.01315.88
7.1.270.0030.01015.46
7.1.260.0040.00815.71
7.1.250.0000.00915.29
7.1.240.0090.00315.79
7.1.230.0060.00615.77
7.1.220.0030.00715.64
7.1.210.0000.01315.89
7.1.200.0020.00815.51
7.1.190.0030.00915.73
7.1.180.0040.00415.51
7.1.170.0030.00715.43
7.1.160.0040.00715.65
7.1.150.0040.01215.57
7.1.140.0060.00315.59
7.1.130.0030.00715.68
7.1.120.0120.00315.59
7.1.110.0040.01115.81
7.1.100.0070.00716.90
7.1.90.0110.00315.51
7.1.80.0040.00715.55
7.1.70.0040.00416.12
7.1.60.0030.01517.52
7.1.50.0100.00716.23
7.1.40.0040.01115.45
7.1.30.0030.00915.32
7.1.20.0060.00615.62
7.1.10.0030.01015.74
7.1.00.0020.04318.93
7.0.330.0070.00715.24
7.0.320.0030.01015.03
7.0.310.0070.00315.01
7.0.300.0060.00615.41
7.0.290.0130.00015.20
7.0.280.0030.01315.54
7.0.270.0030.00715.34
7.0.260.0060.00315.17
7.0.250.0080.00515.31
7.0.240.0150.00015.29
7.0.230.0030.00715.26
7.0.220.0030.00715.17
7.0.210.0040.00515.02
7.0.200.0310.01215.01
7.0.190.0040.01115.18
7.0.180.0060.00915.40
7.0.170.0000.01115.36
7.0.160.0080.00815.29
7.0.150.0000.00815.13
7.0.140.0060.03618.49
7.0.130.0070.00715.21
7.0.120.0130.00015.48
7.0.110.0030.01015.29
7.0.100.0000.01115.25
7.0.90.0070.00715.45
7.0.80.0090.00415.48
7.0.70.0030.00915.51
7.0.60.0080.03517.70
7.0.50.0080.04216.76
7.0.40.0100.02716.81
7.0.30.0300.03516.71
7.0.20.0100.03716.70
7.0.10.0100.02716.81
7.0.00.0070.03316.63
5.6.400.0030.00714.11
5.6.390.0060.00914.09
5.6.380.0060.01014.06
5.6.370.0030.01014.53
5.6.360.0100.00314.00
5.6.350.0080.00614.10
5.6.340.0040.01114.25
5.6.330.0070.01013.81
5.6.320.0070.00713.90
5.6.310.0140.00014.09
5.6.300.0030.01314.23
5.6.290.0070.01114.41
5.6.280.0060.03817.66
5.6.270.0000.01414.68
5.6.260.0090.00614.52
5.6.250.0070.00414.34
5.6.240.0030.01014.50
5.6.230.0000.01114.24
5.6.220.0000.01314.26
5.6.210.0050.02217.42
5.6.200.0070.03016.37
5.6.190.0050.04417.52
5.6.180.0050.03117.50
5.6.170.0160.04017.61
5.6.160.0080.04217.18
5.6.150.0080.04116.19
5.6.140.0030.04616.30
5.6.130.0080.03816.37
5.6.120.0080.04317.72
5.6.110.0070.03817.51
5.6.100.0050.04717.57
5.6.90.0080.04017.58
5.6.80.0090.02817.35
5.6.70.1920.02617.46
5.6.60.0000.00913.96
5.6.50.0070.00714.50
5.6.40.0000.00914.32
5.6.30.0060.00614.14
5.6.20.0070.00714.27
5.6.10.0060.01214.02
5.6.00.0030.00614.44
5.5.380.0060.00914.02
5.5.370.0070.00714.14
5.5.360.0060.00614.30
5.5.350.0040.03817.28
5.5.340.0060.02316.12
5.5.330.0050.04817.07
5.5.320.0130.04617.28
5.5.310.0150.04217.39
5.5.300.0050.02216.19
5.5.290.0080.04016.05
5.5.280.0050.03117.43
5.5.270.0100.04317.34
5.5.260.0050.02617.66
5.5.250.0070.04617.46
5.5.240.0020.04417.23
5.5.230.0040.00414.06
5.5.220.0000.01114.13
5.5.210.0030.01313.96
5.5.200.0000.01214.27
5.5.190.0000.01214.14
5.5.180.0040.00414.05
5.5.170.0110.00413.91
5.5.160.0040.00813.82
5.5.150.0030.01014.06
5.5.140.0030.00614.07
5.5.130.0060.00913.92
5.5.120.0030.00914.29
5.5.110.0150.00014.35
5.5.100.0070.00714.45
5.5.90.0090.00314.13
5.5.80.0070.00714.26
5.5.70.0040.00714.00
5.5.60.0000.00914.13
5.5.50.0040.01114.33
5.5.40.0060.00614.12
5.5.30.0030.01014.22
5.5.20.0100.00314.02
5.5.10.0070.00313.90
5.5.00.0150.00013.71
5.4.450.0130.02315.60
5.4.440.0190.02815.53
5.4.430.0130.02515.60
5.4.420.0180.02315.51
5.4.410.0080.02915.54
5.4.400.0170.02315.43
5.4.390.0250.02715.38
5.4.380.0180.04015.25
5.4.370.0170.02715.18
5.4.360.0190.02615.24
5.4.350.0190.02815.08
5.4.340.0200.03315.27
5.4.330.0070.00311.73
5.4.320.0070.02212.12
5.4.310.0040.02412.12
5.4.300.0030.02412.12
5.4.290.0070.02412.12
5.4.280.0080.02212.07
5.4.270.0060.02312.07
5.4.260.0070.02412.07
5.4.250.0060.02512.07
5.4.240.0070.02112.07
5.4.230.0040.02112.06
5.4.220.0040.02512.06
5.4.210.0060.02212.06
5.4.200.0040.02412.06
5.4.190.0060.02812.06
5.4.180.0050.02312.06
5.4.170.0040.02612.07
5.4.160.0070.01912.06
5.4.150.0050.02412.06
5.4.140.0040.02811.90
5.4.130.0020.02511.90
5.4.120.0090.01611.88
5.4.110.0040.02211.88
5.4.100.0050.02511.88
5.4.90.0070.02311.88
5.4.80.0060.02411.88
5.4.70.0040.02511.87
5.4.60.0070.02111.87
5.4.50.0030.02211.87
5.4.40.0100.02211.87
5.4.30.0050.02211.87
5.4.20.0070.02511.86
5.4.10.0030.02611.86
5.4.00.0090.01611.61
5.3.290.0090.04112.80
5.3.280.0110.03412.71
5.3.270.0120.03812.73
5.3.260.0070.05412.72
5.3.250.0110.04312.72
5.3.240.0120.03712.72
5.3.230.0060.04612.71
5.3.220.0050.04212.68
5.3.210.0080.04112.68
5.3.200.0050.03912.68
5.3.190.0060.04312.68
5.3.180.0070.04512.67
5.3.170.0080.04712.67
5.3.160.0050.03812.67
5.3.150.0100.03512.68
5.3.140.0080.03412.66
5.3.130.0070.05212.65
5.3.120.0090.04612.66
5.3.110.0050.04412.66
5.3.100.0070.03912.13
5.3.90.0070.04312.11
5.3.80.0050.03812.11
5.3.70.0090.03312.11
5.3.60.0080.04212.09
5.3.50.0100.04112.04
5.3.40.0060.03812.04
5.3.30.0120.03512.00
5.3.20.0080.04011.78
5.3.10.0080.03411.75
5.3.00.0100.04411.73
5.2.170.0100.0339.23
5.2.160.0060.0289.22
5.2.150.0080.0359.23
5.2.140.0080.0299.22
5.2.130.0040.0339.18
5.2.120.0040.0289.18
5.2.110.0060.0299.19
5.2.100.0060.0329.18
5.2.90.0090.0349.18
5.2.80.0060.0289.17
5.2.70.0050.0309.18
5.2.60.0050.0369.14
5.2.50.0050.0389.10
5.2.40.0080.0289.08
5.2.30.0020.0359.05
5.2.20.0060.0409.05
5.2.10.0050.0458.95
5.2.00.0060.0308.82
5.1.60.0060.0238.09
5.1.50.0070.0248.09
5.1.40.0020.0328.08
5.1.30.0080.0378.42
5.1.20.0090.0378.45
5.1.10.0060.0328.16
5.1.00.0040.0298.16
5.0.50.0050.0196.65
5.0.40.0070.0326.51
5.0.30.0040.0376.32
5.0.20.0040.0216.29
5.0.10.0060.0186.27
5.0.00.0070.0336.25
4.4.90.0050.0174.78
4.4.80.0030.0244.76
4.4.70.0020.0164.75
4.4.60.0040.0144.76
4.4.50.0040.0304.77
4.4.40.0060.0224.71
4.4.30.0030.0154.76
4.4.20.0040.0144.85
4.4.10.0080.0164.84
4.4.00.0030.0254.76
4.3.110.0030.0154.67
4.3.100.0030.0214.67
4.3.90.0050.0174.63
4.3.80.0020.0264.58
4.3.70.0010.0164.63
4.3.60.0030.0144.63
4.3.50.0040.0154.63
4.3.40.0060.0214.54
4.3.30.0030.0153.30
4.3.20.0040.0143.29
4.3.10.0030.0153.23
4.3.00.0070.01316.71

preferences:
53.85 ms | 401 KiB | 5 Q