3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Qux { public static function bar() { return __CLASS__; } } class Foo { use Qux; } class Baz extends Foo { } $reflectionTrait = new ReflectionMethod('Qux', 'bar'); $reflectionClass = new ReflectionMethod('Foo', 'bar'); $reflectionExtended = new ReflectionMethod('Baz', 'bar'); var_dump(Qux::bar(), $reflectionTrait->getDeclaringClass()->getName(), $reflectionTrait->invoke(null)); var_dump(Foo::bar(), $reflectionClass->getDeclaringClass()->getName(), $reflectionClass->invoke(null)); var_dump(Baz::bar(), $reflectionExtended->getDeclaringClass()->getName(), $reflectionExtended->invoke(null));

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.0080.00722.05
8.3.40.0040.01118.84
8.3.30.0100.01019.04
8.3.20.0040.00420.34
8.3.10.0050.00323.52
8.3.00.0060.00319.19
8.2.180.0130.00616.63
8.2.170.0070.00722.96
8.2.160.0130.00320.27
8.2.150.0080.00024.18
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0040.00420.82
8.2.110.0100.00019.09
8.2.100.0080.00418.03
8.2.90.0030.00618.99
8.2.80.0000.00817.97
8.2.70.0060.00317.63
8.2.60.0000.00817.93
8.2.50.0000.00818.10
8.2.40.0030.00619.88
8.2.30.0070.00018.16
8.2.20.0040.00417.75
8.2.10.0000.00718.08
8.2.00.0040.00417.78
8.1.280.0140.00425.92
8.1.270.0040.00423.70
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0040.00822.54
8.1.230.0050.00517.77
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0060.00317.25
8.1.190.0000.00817.36
8.1.180.0040.00418.10
8.1.170.0060.00318.47
8.1.160.0070.00021.96
8.1.150.0000.00718.63
8.1.140.0080.00017.43
8.1.130.0070.00017.83
8.1.120.0070.00017.48
8.1.110.0000.00817.41
8.1.100.0050.00217.49
8.1.90.0000.00717.55
8.1.80.0040.00417.50
8.1.70.0040.00417.36
8.1.60.0040.00417.57
8.1.50.0040.00417.57
8.1.40.0040.00417.45
8.1.30.0040.00417.65
8.1.20.0000.00817.70
8.1.10.0040.00417.61
8.1.00.0000.00717.42
8.0.300.0060.00318.77
8.0.290.0080.00016.74
8.0.280.0000.00718.46
8.0.270.0000.00717.27
8.0.260.0000.00617.26
8.0.250.0000.00717.01
8.0.240.0030.00316.96
8.0.230.0070.00016.83
8.0.220.0030.00316.88
8.0.210.0040.00416.95
8.0.200.0000.00616.99
8.0.190.0050.00316.98
8.0.180.0000.00816.96
8.0.170.0000.00716.97
8.0.160.0050.00316.88
8.0.150.0040.00416.84
8.0.140.0000.00816.80
8.0.130.0030.00313.38
8.0.120.0070.00016.87
8.0.110.0070.00016.92
8.0.100.0000.00716.70
8.0.90.0050.00316.82
8.0.80.0040.01116.98
8.0.70.0070.00016.81
8.0.60.0030.00416.79
8.0.50.0000.00716.87
8.0.30.0140.00617.01
8.0.20.0120.00717.40
8.0.10.0020.00517.03
8.0.00.0090.01316.86
7.4.330.0040.00015.00
7.4.320.0000.00716.52
7.4.300.0030.00316.64
7.4.290.0000.00716.55
7.4.280.0070.00416.66
7.4.270.0030.00516.67
7.4.260.0000.00716.49
7.4.250.0000.00716.49
7.4.240.0040.00316.64
7.4.230.0030.00316.41
7.4.220.0090.00916.64
7.4.210.0070.00716.56
7.4.200.0030.00316.42
7.4.190.0030.00316.70
7.4.160.0120.00416.38
7.4.150.0090.01017.40
7.4.140.0090.00917.86
7.4.130.0080.01216.56
7.4.120.0100.00816.50
7.4.110.0110.00616.39
7.4.100.0090.00916.49
7.4.90.0000.01716.68
7.4.80.0040.01319.39
7.4.70.0050.01116.35
7.4.60.0100.00716.47
7.4.50.0000.00416.56
7.4.40.0150.00616.37
7.4.30.0100.01016.64
7.4.00.0070.00415.19
7.3.330.0000.00513.35
7.3.320.0000.00513.33
7.3.310.0040.00416.31
7.3.300.0030.00316.19
7.3.290.0120.00616.33
7.3.280.0100.00916.31
7.3.270.0110.00717.40
7.3.260.0030.01416.29
7.3.250.0120.00716.62
7.3.240.0120.01116.25
7.3.230.0000.02116.48
7.3.210.0140.00516.26
7.3.200.0060.01819.39
7.3.190.0170.00016.40
7.3.180.0080.01116.32
7.3.170.0080.00816.59
7.3.160.0060.01016.29
7.3.120.0040.01414.99
7.2.330.0190.00016.47
7.2.320.0100.00716.65
7.2.310.0000.01816.77
7.2.300.0110.00516.55
7.2.290.0120.00916.66
7.1.70.0060.00316.88
7.1.60.0170.00719.70
7.1.50.0030.01916.68
7.1.00.0030.07722.40
7.0.200.0050.00516.41
7.0.140.0030.07322.00
7.0.60.0070.04019.96
7.0.50.0070.08317.89
7.0.40.0100.07320.09
7.0.30.0200.04320.28
7.0.20.0230.05720.15
7.0.10.0000.04720.12
7.0.00.0030.06020.06
5.6.280.0070.06320.82
5.6.210.0100.07720.71
5.6.200.0030.07318.18
5.6.190.0000.04720.58
5.6.180.0200.05020.41
5.6.170.0170.04020.57
5.6.160.0100.06020.54
5.6.150.0070.04018.15
5.6.140.0000.04018.14
5.6.130.0100.07718.19
5.6.120.0030.05021.02
5.6.110.0100.06320.96
5.6.100.0070.05020.98
5.6.90.0030.06020.95
5.6.80.0130.05320.50
5.5.350.0070.05020.41
5.5.340.0070.08317.96
5.5.330.0070.08020.25
5.5.320.0070.05020.32
5.5.310.0270.06720.24
5.5.300.0000.04018.09
5.5.290.0170.07018.01
5.5.280.0000.04320.88
5.5.270.0030.06720.73
5.5.260.0070.08320.93
5.5.250.0000.08320.80
5.5.240.4230.03020.23
5.4.450.0430.04319.55
5.4.440.0170.03719.16
5.4.430.0330.04019.54
5.4.420.0200.04719.38
5.4.410.0070.04319.06
5.4.400.0100.04019.32
5.4.390.0170.04019.19
5.4.380.0100.05718.49
5.4.370.0100.05718.72
5.4.360.0170.04718.58
5.4.350.0230.04318.73
5.4.340.0100.05718.52
5.4.320.0070.04412.50
5.4.310.0130.06212.50
5.4.300.0040.03912.50
5.4.290.0070.04012.50
5.4.280.0060.03912.40
5.4.270.0050.04112.39
5.4.260.0080.03712.40
5.4.250.0070.03712.39
5.4.240.0080.03512.40
5.4.230.0050.03912.39
5.4.220.0070.03612.39
5.4.210.0040.03812.39
5.4.200.0060.03912.39
5.4.190.0040.03812.39
5.4.180.0070.03912.39
5.4.170.0050.03812.40
5.4.160.0040.03912.39
5.4.150.0070.03612.39
5.4.140.0090.03812.07
5.4.130.0080.03612.06
5.4.120.0040.04112.02
5.4.110.0120.05112.02
5.4.100.0080.04812.02
5.4.90.0080.04712.02
5.4.80.0050.04012.02
5.4.70.0070.04012.01
5.4.60.0130.04912.01
5.4.50.0070.05012.01
5.4.40.0070.04112.00
5.4.30.0060.04212.00
5.4.20.0080.04412.00
5.4.10.0060.04112.00
5.4.00.0030.04011.49
5.3.290.0060.04212.80
5.3.280.0050.04512.71
5.3.270.0090.03612.73
5.3.260.0080.03812.72
5.3.250.0090.03912.72
5.3.240.0060.03912.72
5.3.230.0080.03812.71
5.3.220.0100.03612.68
5.3.210.0080.05512.68
5.3.200.0080.05412.68
5.3.190.0080.05812.68
5.3.180.0120.05912.68
5.3.170.0100.05312.67
5.3.160.0060.05512.67
5.3.150.0090.05212.67
5.3.140.0100.05412.66
5.3.130.0070.05612.66
5.3.120.0070.04812.66
5.3.110.0090.03612.66
5.3.100.0060.04012.12
5.3.90.0070.03712.09
5.3.80.0060.03612.07
5.3.70.0100.03612.08
5.3.60.0050.04112.07
5.3.50.0070.04712.00
5.3.40.0080.04612.00
5.3.30.0070.04011.95
5.3.20.0090.03811.73
5.3.10.0070.03711.70
5.3.00.0080.04111.68
5.2.170.0060.0349.18
5.2.160.0080.0339.18
5.2.150.0070.0599.18
5.2.140.0080.0429.18
5.2.130.0070.0519.14
5.2.120.0040.0409.14
5.2.110.0070.0419.15
5.2.100.0100.0489.14
5.2.90.0070.0449.14
5.2.80.0050.0439.14
5.2.70.0060.0459.14
5.2.60.0040.0489.09
5.2.50.0090.0419.06
5.2.40.0080.0379.04
5.2.30.0080.0449.02
5.2.20.0070.0529.00
5.2.10.0130.0358.92
5.2.00.0110.0398.79
5.1.60.0080.0358.07
5.1.50.0040.0308.06
5.1.40.0080.0308.05
5.1.30.0040.0308.40
5.1.20.0070.0268.42
5.1.10.0080.0258.14
5.1.00.0070.0268.14
5.0.50.0090.0206.63
5.0.40.0040.0246.48
5.0.30.0040.0346.29
5.0.20.0080.0196.26
5.0.10.0050.0206.24
5.0.00.0030.0326.23
4.4.90.0070.0134.78
4.4.80.0020.0174.75
4.4.70.0030.0164.75
4.4.60.0010.0194.76
4.4.50.0010.0194.77
4.4.40.0030.0264.71
4.4.30.0030.0164.76
4.4.20.0040.0174.85
4.4.10.0030.0164.85
4.4.00.0050.0264.76
4.3.110.0020.0194.67
4.3.100.0030.0174.66
4.3.90.0040.0214.63
4.3.80.0050.0244.58
4.3.70.0040.0154.63
4.3.60.0090.0104.63
4.3.50.0030.0184.63
4.3.40.0030.0254.54
4.3.30.0050.0153.28
4.3.20.0040.0163.26
4.3.10.0040.0163.22
4.3.00.0030.01715.22

preferences:
35.32 ms | 401 KiB | 5 Q