3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(ReflectionFunctionAbstract $r) { echo 'isClosure(): '; var_dump($r->isClosure()); if ($r instanceof ReflectionMethod) { $rc = $r->getDeclaringClass(); $dc = $rc ? $rc->getName() : 'no declaring class'; } else { $dc = 'not a ReflectionMethod'; } echo 'getDeclaringClass(): ' . $dc; echo "\n"; $csc = $r->getClosureScopeClass(); echo 'getClosureScopeClass(): ' . ($csc ? $csc->getName() : 'no closure scope class'); echo "\n"; echo "\n"; } class C { function f() { return function($p) {}; } } class C2 {} $c = new C; $cl = $c->f(); $rf = new ReflectionFunction($cl); test($rf); $rps = $rf->getParameters(); $rp = $rps[0]; test($rp->getDeclaringFunction()); $cl->bindTo(new C2); $rf = new ReflectionFunction($cl); test($rf); $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.0100.01018.43
8.3.50.0050.01422.01
8.3.40.0090.00618.67
8.3.30.0030.01019.21
8.3.20.0060.00320.13
8.3.10.0060.00320.51
8.3.00.0040.00419.13
8.2.180.0090.00616.59
8.2.170.0140.00322.96
8.2.160.0100.00618.79
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00421.09
8.2.110.0000.01022.08
8.2.100.0040.01117.91
8.2.90.0000.00919.36
8.2.80.0030.00617.97
8.2.70.0000.00917.63
8.2.60.0050.00317.93
8.2.50.0030.00618.07
8.2.40.0000.00818.16
8.2.30.0030.00319.42
8.2.20.0000.00717.79
8.2.10.0000.00818.16
8.2.00.0040.00417.67
8.1.280.0100.00725.92
8.1.270.0050.00323.76
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0030.00623.83
8.1.230.0110.00019.22
8.1.220.0080.00017.79
8.1.210.0050.00318.77
8.1.200.0090.00417.10
8.1.190.0000.00817.36
8.1.180.0040.00418.10
8.1.170.0040.00418.45
8.1.160.0000.00822.05
8.1.150.0000.00818.96
8.1.140.0080.00017.38
8.1.130.0030.00317.86
8.1.120.0030.00417.48
8.1.110.0000.00817.44
8.1.100.0000.00717.54
8.1.90.0000.00717.48
8.1.80.0030.00317.52
8.1.70.0030.00317.50
8.1.60.0080.00017.68
8.1.50.0050.00317.54
8.1.40.0080.00017.54
8.1.30.0040.00417.60
8.1.20.0080.00017.66
8.1.10.0000.00717.60
8.1.00.0000.00917.59
8.0.300.0040.00418.77
8.0.290.0000.00816.75
8.0.280.0000.00818.46
8.0.270.0080.00017.34
8.0.260.0060.00017.21
8.0.250.0000.00717.02
8.0.240.0000.00717.13
8.0.230.0070.00017.05
8.0.220.0070.00016.93
8.0.210.0040.00416.95
8.0.200.0000.00617.09
8.0.190.0080.00017.09
8.0.180.0000.00716.91
8.0.170.0040.00416.96
8.0.160.0000.00716.99
8.0.150.0030.00316.84
8.0.140.0050.00316.84
8.0.130.0000.00613.38
8.0.120.0080.00016.83
8.0.110.0040.00417.00
8.0.100.0040.00416.88
8.0.90.0050.00317.10
8.0.80.0080.00816.99
8.0.70.0050.00316.97
8.0.60.0000.00717.01
8.0.50.0040.00417.10
8.0.30.0090.01217.27
8.0.20.0110.01117.40
8.0.10.0070.00017.04
8.0.00.0090.01316.93
7.4.330.0030.00315.00
7.4.320.0030.00316.65
7.4.300.0060.00016.52
7.4.290.0040.00416.64
7.4.280.0000.00716.67
7.4.270.0030.00316.59
7.4.260.0040.00416.59
7.4.250.0000.00716.48
7.4.240.0020.00516.51
7.4.230.0030.00516.59
7.4.220.0030.02016.67
7.4.210.0040.00916.57
7.4.200.0070.00016.71
7.4.160.0040.01116.39
7.4.150.0060.01217.40
7.4.140.0140.00717.86
7.4.130.0120.00716.54
7.4.120.0090.01316.45
7.4.110.0170.00316.38
7.4.100.0040.01316.53
7.4.90.0030.01416.52
7.4.80.0160.00619.39
7.4.70.0120.00416.60
7.4.60.0190.00616.63
7.4.50.0050.00316.40
7.4.40.0150.00616.46
7.4.30.0080.01116.52
7.4.00.0040.01415.07
7.3.330.0030.00313.42
7.3.320.0050.00013.32
7.3.310.0030.00316.39
7.3.300.0000.00716.25
7.3.290.0070.00716.45
7.3.280.0100.00816.39
7.3.270.0170.00317.40
7.3.260.0140.01016.65
7.3.250.0090.00716.42
7.3.240.0040.01616.66
7.3.230.0110.00716.39
7.3.210.0150.00616.47
7.3.200.0030.01619.39
7.3.190.0070.01016.50
7.3.180.0080.00816.32
7.3.170.0050.01116.54
7.3.160.0100.00916.40
7.2.330.0070.01116.45
7.2.320.0000.01716.84
7.2.310.0150.00316.84
7.2.300.0070.01016.85
7.2.290.0120.00616.77
7.2.60.0000.01416.89
7.2.00.0110.00419.50
7.1.200.0000.01215.96
7.1.100.0060.00618.18
7.1.70.0040.00417.20
7.1.60.0120.01219.61
7.1.50.0090.01516.78
7.1.00.0130.06722.36
7.0.200.0250.00914.74
7.0.140.0070.06321.95
7.0.60.0070.07720.08
7.0.50.0070.04017.98
7.0.40.0100.08320.30
7.0.30.0370.06320.13
7.0.20.0300.07020.08
7.0.10.0300.07720.16
7.0.00.0100.05720.18
5.6.280.0070.07021.12
5.6.210.0070.03720.63
5.6.200.0070.04318.14
5.6.190.0100.08020.63
5.6.180.0400.06320.55
5.6.170.0070.05020.47
5.6.160.0030.05020.47
5.6.150.0130.07318.19
5.6.140.0100.05718.24
5.6.130.0030.05718.18
5.6.120.0170.06721.03
5.6.110.0100.07021.15
5.6.100.0100.07020.98
5.6.90.0130.07321.01
5.6.80.0170.05720.38
5.6.70.4070.04020.53
5.5.350.0070.03020.45
5.5.340.0000.05317.94
5.5.330.0000.05320.31
5.5.320.0270.07720.38
5.5.310.0170.04320.42
5.5.300.0070.07718.05
5.5.290.0070.07018.04
5.5.280.0030.06020.68
5.5.270.0070.04320.85
5.5.260.0000.04720.81
5.5.250.0100.08320.79
5.5.240.0130.05320.25
5.4.450.0230.05019.47
5.4.440.0770.04019.39
5.4.430.0300.04319.52
5.4.420.0500.04319.46
5.4.410.0330.05019.41
5.4.400.0370.03319.10
5.4.390.0170.04719.14
5.4.380.0530.04718.76
5.4.370.0270.05318.80
5.4.360.0630.06718.73
5.4.350.0370.05318.60
5.4.340.0230.06018.75
5.4.320.0110.04012.52
5.4.310.0080.04712.51
5.4.300.0070.04012.52
5.4.290.0050.03912.51
5.4.280.0060.03812.41
5.4.270.0050.04912.41
5.4.260.0060.04312.41
5.4.250.0060.04212.41
5.4.240.0080.04312.41
5.4.230.0080.03512.41
5.4.220.0050.03712.40
5.4.210.0050.04012.41
5.4.200.0110.03812.40
5.4.190.0080.03312.40
5.4.180.0080.04112.40
5.4.170.0060.04112.41
5.4.160.0070.03512.40
5.4.150.0060.03812.40
5.4.140.0070.04112.08
5.4.130.0050.04012.07
5.4.120.0080.03612.03
5.4.110.0070.03412.02
5.4.100.0060.03612.02
5.4.90.0060.03812.02
5.4.80.0060.03512.03
5.4.70.0050.03412.02
5.4.60.0050.03412.02
5.4.50.0060.03912.02
5.4.40.0040.03912.01
5.4.30.0020.03812.01
5.4.20.0070.03212.01
5.4.10.0070.03212.01
5.4.00.0050.03611.49
5.3.290.0080.04812.80
5.3.280.0060.03712.71
5.3.270.0080.03612.72
5.3.260.0040.03912.72
5.3.250.0070.04212.72
5.3.240.0050.04212.72
5.3.230.0080.03912.71
5.3.220.0060.03912.68
5.3.210.0050.04112.68
5.3.200.0060.03712.68
5.3.190.0070.03812.68
5.3.180.0060.03812.67
5.3.170.0070.03612.67
5.3.160.0030.03812.67
5.3.150.0050.03712.67
5.3.140.0050.03812.66
5.3.130.0110.03512.66
5.3.120.0040.03912.66
5.3.110.0080.03512.66
5.3.100.0070.04012.13
5.3.90.0040.03712.11
5.3.80.0060.03512.11
5.3.70.0050.03712.11
5.3.60.0040.03812.09
5.3.50.0100.03112.04
5.3.40.0050.03712.04
5.3.30.0050.03412.00
5.3.20.0120.03511.78
5.3.10.0040.04011.74
5.3.00.0070.03411.73
5.2.170.0040.0309.23
5.2.160.0040.0309.22
5.2.150.0070.0289.22
5.2.140.0050.0299.22
5.2.130.0040.0379.18
5.2.120.0070.0259.18
5.2.110.0060.0299.19
5.2.100.0050.0319.19
5.2.90.0050.0299.18
5.2.80.0050.0309.18
5.2.70.0070.0289.18
5.2.60.0050.0369.13
5.2.50.0040.0309.09
5.2.40.0040.0299.07
5.2.30.0060.0279.06
5.2.20.0070.0309.04
5.2.10.0040.0298.95
5.2.00.0060.0268.82
5.1.60.0030.0248.09
5.1.50.0060.0268.09
5.1.40.0070.0208.07
5.1.30.0030.0268.43
5.1.20.0020.0288.45
5.1.10.0040.0258.17
5.1.00.0020.0318.17
5.0.50.0060.0176.65
5.0.40.0030.0236.51
5.0.30.0010.0336.33
5.0.20.0020.0206.29
5.0.10.0010.0286.27
5.0.00.0020.0326.26
4.4.90.0030.0154.78
4.4.80.0030.0204.75
4.4.70.0030.0184.76
4.4.60.0020.0164.75
4.4.50.0000.0224.77
4.4.40.0020.0314.70
4.4.30.0030.0284.75
4.4.20.0020.0154.84
4.4.10.0010.0164.85
4.4.00.0050.0274.76
4.3.110.0010.0224.66
4.3.100.0020.0224.67
4.3.90.0040.0134.63
4.3.80.0020.0244.58
4.3.70.0030.0144.63
4.3.60.0030.0184.63
4.3.50.0030.0264.63
4.3.40.0050.0214.53
4.3.30.0040.0183.30
4.3.20.0010.0173.29
4.3.10.0030.0193.23
4.3.00.0070.01316.71

preferences:
38.94 ms | 401 KiB | 5 Q