3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(ReflectionFunctionAbstract $rf) { 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.0120.00618.55
8.3.50.0120.00822.06
8.3.40.0140.00718.89
8.3.30.0110.00319.05
8.3.20.0040.00420.34
8.3.10.0050.00320.66
8.3.00.0080.00019.38
8.2.180.0040.01118.54
8.2.170.0150.00619.04
8.2.160.0090.00922.96
8.2.150.0050.00225.66
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0000.00821.06
8.2.110.0030.00620.51
8.2.100.0040.00718.03
8.2.90.0050.00519.05
8.2.80.0050.00317.97
8.2.70.0050.00517.75
8.2.60.0000.00918.05
8.2.50.0040.00418.07
8.2.40.0000.00818.28
8.2.30.0000.00719.53
8.2.20.0050.00317.66
8.2.10.0050.00318.04
8.2.00.0080.00017.70
8.1.280.0070.01025.92
8.1.270.0030.00523.67
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0030.01318.83
8.1.230.0040.00819.15
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0110.00917.50
8.1.190.0040.00417.35
8.1.180.0030.00618.10
8.1.170.0000.00918.54
8.1.160.0040.00422.05
8.1.150.0070.00018.93
8.1.140.0050.00517.48
8.1.130.0000.00717.74
8.1.120.0070.00017.55
8.1.110.0040.00417.50
8.1.100.0070.00017.42
8.1.90.0040.00417.38
8.1.80.0040.00417.43
8.1.70.0070.00017.46
8.1.60.0050.00317.61
8.1.50.0080.00017.55
8.1.40.0000.00717.50
8.1.30.0000.00817.72
8.1.20.0040.00417.62
8.1.10.0000.00817.60
8.1.00.0000.00817.51
8.0.300.0040.00418.77
8.0.290.0060.00316.75
8.0.280.0000.00718.32
8.0.270.0070.00017.16
8.0.260.0000.00617.22
8.0.250.0000.00717.04
8.0.240.0040.00416.91
8.0.230.0030.00316.95
8.0.220.0000.00716.81
8.0.210.0030.00316.80
8.0.200.0060.00017.06
8.0.190.0030.00716.92
8.0.180.0000.00816.89
8.0.170.0080.00017.04
8.0.160.0000.00817.02
8.0.150.0000.00716.95
8.0.140.0050.00316.81
8.0.130.0000.00613.45
8.0.120.0030.00516.93
8.0.110.0020.00516.95
8.0.100.0000.00817.02
8.0.90.0040.00417.05
8.0.80.0040.01116.97
8.0.70.0040.00416.84
8.0.60.0050.00316.98
8.0.50.0070.00016.91
8.0.30.0140.01117.09
8.0.20.0080.01117.40
8.0.10.0000.00717.02
8.0.00.0100.00917.00
7.4.330.0000.00515.00
7.4.320.0030.00316.66
7.4.300.0070.00016.64
7.4.290.0070.00016.56
7.4.280.0070.00016.44
7.4.270.0030.00516.45
7.4.260.0070.00016.54
7.4.250.0040.00416.58
7.4.240.0020.00516.58
7.4.230.0000.00716.38
7.4.220.0120.01416.56
7.4.210.0060.01216.59
7.4.200.0040.00416.37
7.4.160.0160.00016.47
7.4.150.0060.01217.40
7.4.140.0150.00617.86
7.4.130.0070.01116.57
7.4.120.0030.01416.62
7.4.110.0070.01416.70
7.4.100.0090.00916.60
7.4.90.0030.01516.61
7.4.80.0090.00919.39
7.4.70.0130.00516.71
7.4.60.0030.01616.43
7.4.50.0050.00316.29
7.4.40.0080.00816.73
7.4.30.0060.00916.69
7.4.10.0110.00716.41
7.4.00.0080.01115.84
7.3.330.0030.00313.18
7.3.320.0050.00013.38
7.3.310.0000.00716.40
7.3.300.0000.00716.35
7.3.290.0080.00516.35
7.3.280.0090.00916.39
7.3.270.0120.00617.40
7.3.260.0110.00616.54
7.3.250.0120.00416.41
7.3.240.0030.01916.54
7.3.230.0090.00916.41
7.3.210.0100.00716.33
7.3.200.0090.00919.39
7.3.190.0080.01516.54
7.3.180.0060.00916.47
7.3.170.0070.01016.50
7.3.160.0170.00316.44
7.3.130.0110.00716.44
7.3.120.0070.01316.53
7.3.110.0100.00716.21
7.3.100.0040.01116.46
7.3.90.0110.00716.52
7.3.80.0070.00316.33
7.3.70.0070.01116.50
7.3.60.0070.01316.40
7.3.50.0040.00716.45
7.3.40.0090.00916.38
7.3.30.0000.01316.30
7.3.20.0070.00718.15
7.3.10.0080.00917.39
7.3.00.0100.00417.37
7.2.330.0080.00916.44
7.2.320.0060.01616.46
7.2.310.0070.01116.75
7.2.300.0110.00716.73
7.2.290.0030.01316.75
7.2.260.0070.01416.56
7.2.250.0100.01016.48
7.2.240.0060.00916.68
7.2.230.0090.00616.65
7.2.220.0070.00716.64
7.2.210.0060.00616.68
7.2.200.0070.01016.54
7.2.190.0090.00616.53
7.2.180.0080.00416.64
7.2.170.0040.01216.52
7.2.160.0000.01316.53
7.2.150.0060.00618.46
7.2.140.0040.00718.46
7.2.130.0070.00717.64
7.2.120.0100.00617.63
7.2.110.0070.00517.58
7.2.100.0080.00517.67
7.2.90.0070.00617.72
7.2.80.0090.00717.62
7.2.70.0100.00317.64
7.2.60.0090.00617.42
7.2.50.0030.01017.70
7.2.40.0080.00817.54
7.2.30.0070.00417.69
7.2.20.0050.01117.69
7.2.10.0120.00517.54
7.2.00.0060.00718.22
7.1.330.0040.01217.38
7.1.320.0030.00617.15
7.1.310.0080.00817.51
7.1.300.0060.01217.24
7.1.290.0090.00317.36
7.1.280.0060.00317.15
7.1.270.0090.00617.32
7.1.260.0000.01417.35
7.1.250.0060.00616.43
7.1.240.0030.01217.29
7.1.230.0150.00017.27
7.1.220.0000.01117.35
7.1.210.0070.00717.18
7.1.200.0100.00216.54
7.1.190.0130.00317.21
7.1.180.0060.00917.17
7.1.170.0080.00517.23
7.1.160.0000.01517.07
7.1.150.0040.00717.38
7.1.140.0090.00617.13
7.1.130.0090.00017.42
7.1.120.0040.00817.30
7.1.110.0000.01117.19
7.1.100.0030.01017.55
7.1.90.0110.00717.19
7.1.80.0030.01317.33
7.1.70.0060.00817.24
7.1.60.0080.01318.46
7.1.50.0100.00717.00
7.1.40.0000.01817.24
7.1.30.0070.00717.20
7.1.20.0030.01017.42
7.1.10.0100.00717.24
7.1.00.0060.04019.82
7.0.330.0120.00316.84
7.0.320.0000.01117.04
7.0.310.0060.01116.85
7.0.300.0060.00816.91
7.0.290.0100.00717.06
7.0.280.0060.01317.14
7.0.270.0160.00416.97
7.0.260.0090.01216.93
7.0.250.0110.00717.05
7.0.240.0030.01417.13
7.0.230.0090.00616.93
7.0.220.0090.00917.04
7.0.210.0080.01217.04
7.0.200.0490.00915.85
7.0.190.0060.01117.07
7.0.180.0030.01317.02
7.0.170.0060.01216.86
7.0.160.0030.01016.92
7.0.150.0110.00616.96
7.0.140.0050.03819.45
7.0.130.0000.01117.10
7.0.120.0060.00917.20
7.0.110.0100.00716.99
7.0.100.0070.00716.92
7.0.90.0030.00617.05
7.0.80.0070.00717.11
7.0.70.0030.00616.93
7.0.60.0110.04118.45
7.0.50.0040.03017.45
7.0.40.0090.04017.56
7.0.30.0180.04217.59
7.0.20.0180.02317.57
7.0.10.0130.02917.53
7.0.00.0060.02917.62
5.6.400.0070.00715.84
5.6.390.0110.00415.82
5.6.380.0090.00015.84
5.6.370.0090.00915.96
5.6.360.0060.00915.77
5.6.350.0120.00315.99
5.6.340.0040.01415.84
5.6.330.0080.00815.83
5.6.320.0080.01216.20
5.6.310.0120.01216.23
5.6.300.0110.00316.03
5.6.290.0070.00715.98
5.6.280.0030.04218.40
5.6.270.0090.00615.86
5.6.260.0000.01415.63
5.6.250.0070.00415.72
5.6.240.0090.00615.72
5.6.230.0060.00915.76
5.6.220.0030.01016.13
5.6.210.0090.04518.19
5.6.200.0110.03316.93
5.6.190.0120.04718.17
5.6.180.0130.02318.15
5.6.170.0130.02518.20
5.6.160.0080.04418.11
5.6.150.0110.03717.09
5.6.140.0070.04416.92
5.6.130.0070.04317.05
5.6.120.0050.02718.40
5.6.110.0070.03218.34
5.6.100.0060.04518.57
5.6.90.0050.04318.40
5.6.80.0070.04018.17
5.6.70.2370.02018.08
5.6.60.0140.00315.85
5.6.50.0050.00515.55
5.6.40.0100.00015.79
5.6.30.0060.00915.86
5.6.20.0070.00715.87
5.6.10.0040.01115.68
5.6.00.0060.00615.69
5.5.380.0060.00315.83
5.5.370.0030.01315.75
5.5.360.0070.00715.84
5.5.350.0050.02217.98
5.5.340.0030.02516.84
5.5.330.0080.02218.07
5.5.320.0190.04017.88
5.5.310.0170.02217.94
5.5.300.0050.02616.82
5.5.290.0080.02216.93
5.5.280.0060.03818.18
5.5.270.0160.04018.19
5.5.260.0070.02818.18
5.5.250.0120.03818.12
5.5.240.0080.03317.91
5.5.230.0040.01415.33
5.5.220.0070.01015.64
5.5.210.0030.00815.82
5.5.200.0040.00815.63
5.5.190.0040.00815.51
5.5.180.0070.00315.49
5.5.170.0100.00615.52
5.5.160.0070.00715.63
5.5.150.0070.00715.60
5.5.140.0000.00915.41
5.5.130.0100.00715.66
5.5.120.0040.01115.71
5.5.110.0070.00715.79
5.5.100.0090.00615.70
5.5.90.0060.00315.20
5.5.80.0060.00615.61
5.5.70.0030.00915.49
5.5.60.0040.00815.62
5.5.50.0070.00715.61
5.5.40.0060.00915.58
5.5.30.0100.00015.51
5.5.20.0030.00615.65
5.5.10.0090.00615.50
5.5.00.0070.00715.72
5.4.450.0470.02516.66
5.4.440.0100.02616.66
5.4.430.0120.02516.52
5.4.420.0370.02916.64
5.4.410.0240.02216.55
5.4.400.0130.02516.35
5.4.390.0260.02416.36
5.4.380.0180.02816.14
5.4.370.0190.02816.26
5.4.360.0230.02816.28
5.4.350.0170.02916.27
5.4.340.0100.03616.26
5.4.330.0030.00713.77
5.4.320.0040.02213.14
5.4.310.0070.01913.14
5.4.300.0080.02013.14
5.4.290.0030.02213.14
5.4.280.0040.02313.09
5.4.270.0070.02113.09
5.4.260.0070.02113.09
5.4.250.0060.02113.09
5.4.240.0050.02813.09
5.4.230.0060.02113.08
5.4.220.0070.02713.08
5.4.210.0050.02913.08
5.4.200.0070.03013.08
5.4.190.0100.02413.08
5.4.180.0060.02013.08
5.4.170.0070.02713.09
5.4.160.0070.02813.08
5.4.150.0080.02513.08
5.4.140.0050.02812.92
5.4.130.0060.02412.92
5.4.120.0080.02512.89
5.4.110.0070.02012.89
5.4.100.0080.02212.90
5.4.90.0050.02312.89
5.4.80.0040.02312.90
5.4.70.0070.01912.89
5.4.60.0050.02012.89
5.4.50.0090.01712.89
5.4.40.0080.01812.89
5.4.30.0040.02112.88
5.4.20.0050.02412.88
5.4.10.0070.02112.88
5.4.00.0040.02312.63
5.3.290.0070.03812.80
5.3.280.0060.03812.71
5.3.270.0100.03512.73
5.3.260.0080.03612.72
5.3.250.0060.03712.72
5.3.240.0080.03512.72
5.3.230.0040.04012.71
5.3.220.0050.03812.68
5.3.210.0070.03812.68
5.3.200.0070.03612.68
5.3.190.0070.04112.68
5.3.180.0070.03512.67
5.3.170.0040.03912.67
5.3.160.0080.03412.68
5.3.150.0060.04512.68
5.3.140.0080.03512.66
5.3.130.0040.04112.66
5.3.120.0060.03812.65
5.3.110.0090.03612.66
5.3.100.0060.03812.13
5.3.90.0070.03912.11
5.3.80.0050.03712.11
5.3.70.0040.03812.11
5.3.60.0070.03612.09
5.3.50.0100.03212.04
5.3.40.0040.03812.04
5.3.30.0090.03212.00
5.3.20.0080.03411.78
5.3.10.0070.05011.74
5.3.00.0110.03411.73
5.2.170.0080.0289.23
5.2.160.0060.0309.23
5.2.150.0070.0299.22
5.2.140.0080.0289.22
5.2.130.0050.0339.18
5.2.120.0040.0339.18
5.2.110.0050.0299.19
5.2.100.0070.0269.18
5.2.90.0050.0289.18
5.2.80.0060.0299.18
5.2.70.0030.0339.18
5.2.60.0050.0309.14
5.2.50.0090.0419.10
5.2.40.0050.0349.08
5.2.30.0040.0339.05
5.2.20.0050.0309.04
5.2.10.0050.0288.95
5.2.00.0070.0278.81
5.1.60.0060.0248.09
5.1.50.0050.0258.09
5.1.40.0040.0258.07
5.1.30.0070.0238.42
5.1.20.0050.0258.45
5.1.10.0060.0358.17
5.1.00.0090.0318.17
5.0.50.0050.0226.65
5.0.40.0030.0246.51
5.0.30.0030.0326.32
5.0.20.0020.0226.29
5.0.10.0040.0196.27
5.0.00.0070.0276.26
4.4.90.0030.0164.77
4.4.80.0040.0144.75
4.4.70.0040.0144.75
4.4.60.0020.0164.76
4.4.50.0060.0164.77
4.4.40.0030.0254.71
4.4.30.0030.0154.76
4.4.20.0020.0164.85
4.4.10.0000.0184.85
4.4.00.0040.0244.75
4.3.110.0030.0154.67
4.3.100.0030.0154.66
4.3.90.0040.0164.63
4.3.80.0020.0254.58
4.3.70.0030.0144.63
4.3.60.0040.0134.63
4.3.50.0050.0134.63
4.3.40.0020.0254.54
4.3.30.0020.0243.30
4.3.20.0040.0163.28
4.3.10.0010.0173.23
4.3.00.0070.01716.71

preferences:
45.49 ms | 400 KiB | 5 Q