3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Qux { public static function bar() { return __CLASS__; } } class Foo { use Qux; } $reflectionTrait = new ReflectionMethod('Qux', 'bar'); $reflectionClass = new ReflectionMethod('Foo', 'bar'); var_dump(Qux::bar(), $reflectionTrait->getDeclaringClass()->getName(), $reflectionTrait->invoke(null)); var_dump($reflectionClass->getDeclaringClass()->getName(), $reflectionClass->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.0100.01016.50
8.3.50.0130.00521.99
8.3.40.0030.01718.86
8.3.30.0070.00719.05
8.3.20.0000.00820.25
8.3.10.0080.00023.50
8.3.00.0040.00419.24
8.2.180.0150.00416.88
8.2.170.0150.00622.96
8.2.160.0070.01120.45
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0060.00320.79
8.2.110.0030.00719.35
8.2.100.0040.00717.97
8.2.90.0080.00019.11
8.2.80.0050.00317.97
8.2.70.0060.00317.50
8.2.60.0000.00817.80
8.2.50.0040.00418.10
8.2.40.0050.00318.22
8.2.30.0060.00318.34
8.2.20.0040.00417.55
8.2.10.0040.00418.02
8.2.00.0040.00417.73
8.1.280.0100.00725.92
8.1.270.0040.00423.83
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.01022.46
8.1.230.0040.00817.70
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0040.00417.35
8.1.190.0030.00517.23
8.1.180.0080.00018.10
8.1.170.0030.00618.59
8.1.160.0030.00621.98
8.1.150.0000.00718.62
8.1.140.0000.00817.51
8.1.130.0050.00317.76
8.1.120.0000.00817.39
8.1.110.0040.00417.38
8.1.100.0040.00417.47
8.1.90.0070.00017.35
8.1.80.0030.00517.43
8.1.70.0040.00417.39
8.1.60.0060.00317.50
8.1.50.0000.00817.41
8.1.40.0000.00917.42
8.1.30.0000.00817.56
8.1.20.0040.00417.60
8.1.10.0060.00317.66
8.1.00.0040.00417.58
8.0.300.0000.00718.77
8.0.290.0060.00316.63
8.0.280.0000.00718.47
8.0.270.0070.00017.28
8.0.260.0030.00317.22
8.0.250.0000.00816.93
8.0.240.0000.00816.94
8.0.230.0040.00416.99
8.0.220.0070.00016.98
8.0.210.0040.00416.93
8.0.200.0000.00616.95
8.0.190.0000.00716.88
8.0.180.0000.00716.93
8.0.170.0070.00016.91
8.0.160.0070.00017.00
8.0.150.0070.00016.77
8.0.140.0040.00416.76
8.0.130.0030.00313.39
8.0.120.0030.00616.86
8.0.110.0000.00716.86
8.0.100.0000.00716.71
8.0.90.0050.00316.96
8.0.80.0050.01016.89
8.0.70.0050.00316.98
8.0.60.0040.00416.82
8.0.50.0000.00817.02
8.0.30.0110.00717.19
8.0.20.0130.00717.40
8.0.10.0050.00217.04
8.0.00.0100.01116.70
7.4.330.0020.00215.00
7.4.320.0030.00316.52
7.4.300.0000.00616.48
7.4.290.0000.00716.63
7.4.280.0060.00316.64
7.4.270.0030.00316.62
7.4.260.0050.00216.42
7.4.250.0050.00316.52
7.4.240.0010.00616.60
7.4.230.0070.00016.43
7.4.220.0090.00916.65
7.4.210.0120.00916.43
7.4.200.0040.00416.67
7.4.190.0030.00316.76
7.4.160.0060.00916.56
7.4.150.0090.00917.40
7.4.140.0060.01117.86
7.4.130.0100.00716.55
7.4.120.0070.01016.46
7.4.110.0140.00416.63
7.4.100.0120.00616.52
7.4.90.0130.00316.66
7.4.80.0070.01019.39
7.4.70.0060.00916.53
7.4.60.0030.01516.61
7.4.50.0040.00416.22
7.4.40.0120.00616.47
7.4.30.0000.01616.35
7.4.00.0040.01215.20
7.3.330.0000.00513.01
7.3.320.0050.00013.28
7.3.310.0000.00716.35
7.3.300.0030.00316.10
7.3.290.0030.01616.15
7.3.280.0100.00816.32
7.3.270.0100.00717.40
7.3.260.0040.01316.32
7.3.250.0050.01316.39
7.3.240.0090.00916.24
7.3.230.0040.01316.39
7.3.210.0140.00816.25
7.3.200.0170.00419.39
7.3.190.0100.00716.23
7.3.180.0100.00716.46
7.3.170.0110.00416.53
7.3.160.0080.00816.31
7.3.120.0090.00615.03
7.3.10.0080.00416.54
7.3.00.0100.00316.36
7.2.330.0060.01216.26
7.2.320.0160.00316.60
7.2.310.0150.00316.82
7.2.300.0130.00316.58
7.2.290.0070.01416.61
7.2.130.0110.00416.55
7.2.120.0030.00917.01
7.2.110.0060.00316.77
7.2.100.0070.00716.82
7.2.90.0060.00616.92
7.2.80.0120.00016.91
7.2.70.0110.00316.73
7.2.60.0070.00416.73
7.2.50.0000.01216.98
7.2.40.0040.00916.70
7.2.30.0120.00016.73
7.2.20.0040.01116.72
7.2.10.0060.00616.84
7.2.00.0030.01118.11
7.1.250.0090.00015.64
7.1.100.0080.00318.20
7.1.70.0030.00617.21
7.1.60.0120.01219.70
7.1.50.0140.01016.70
7.1.00.0070.07022.31
7.0.200.0000.00716.42
7.0.140.0070.07021.95
7.0.60.0130.05720.07
7.0.50.0070.06017.87
7.0.40.0130.08320.16
7.0.30.0270.07720.23
7.0.20.0370.07020.07
7.0.10.0070.07320.08
7.0.00.0100.04720.10
5.6.280.0000.07721.04
5.6.210.0000.06020.63
5.6.200.0070.08718.29
5.6.190.0070.04020.77
5.6.180.0400.04320.41
5.6.170.0270.05020.50
5.6.160.0000.05020.46
5.6.150.0100.08018.13
5.6.140.0070.06318.12
5.6.130.0030.05718.11
5.6.120.0030.06720.96
5.6.110.0070.08020.96
5.6.100.0230.07021.00
5.6.90.0070.08020.95
5.6.80.0030.04020.43
5.5.350.0370.07020.45
5.5.340.0000.04317.98
5.5.330.0200.06320.21
5.5.320.0000.05320.52
5.5.310.0200.03720.50
5.5.300.0130.07717.92
5.5.290.0030.05017.95
5.5.280.0130.05320.66
5.5.270.0030.07020.86
5.5.260.0000.08020.73
5.5.250.0000.04320.65
5.5.240.0100.07320.00
5.4.450.0200.07719.55
5.4.440.0270.05719.41
5.4.430.0230.06319.56
5.4.420.0230.03719.30
5.4.410.0230.03319.30
5.4.400.0200.04318.87
5.4.390.0130.06719.08
5.4.380.0200.03319.14
5.4.370.0170.07319.04
5.4.360.0200.04319.08
5.4.350.0100.04018.99
5.4.340.0300.07019.08
5.4.320.0100.04319.05
5.4.310.0170.03319.22
5.4.300.0130.05018.88
5.4.290.0200.07019.08
5.4.280.0270.05719.19
5.4.270.0200.04318.94
5.4.260.0130.05319.20
5.4.250.0300.06718.98
5.4.240.0170.04019.05
5.4.230.0270.04019.07
5.4.220.0230.07318.98
5.4.210.0170.05019.23
5.4.200.0130.03719.14
5.4.190.0170.03718.86
5.4.180.0270.05719.07
5.4.170.0230.05318.98
5.4.160.0200.06318.85
5.4.150.0130.05719.07
5.4.140.0200.06716.29
5.4.130.0230.06316.32
5.4.120.0330.04716.37
5.4.110.0230.07316.45
5.4.100.0330.03316.58
5.4.90.0200.07016.53
5.4.80.0270.04316.44
5.4.70.0270.03716.52
5.4.60.0230.03316.32
5.4.50.0170.07016.36
5.4.40.0270.03316.53
5.4.30.0130.03716.24
5.4.20.0300.05016.53
5.4.10.0200.04316.50
5.4.00.0170.04015.90
5.3.290.0230.06714.49
5.3.280.0170.06714.45
5.3.270.0170.05314.44
5.3.260.0230.05314.55
5.3.250.0330.05314.48
5.3.240.0300.06714.46
5.3.230.0200.05314.62
5.3.220.0230.03314.51
5.3.210.0200.04314.52
5.3.200.0230.06014.41
5.3.190.0330.05714.41
5.3.180.0300.06014.40
5.3.170.0270.03714.55
5.3.160.0170.07014.54
5.3.150.0200.04314.51
5.3.140.0130.04314.39
5.3.130.0200.04314.39
5.3.120.0270.03314.45
5.3.110.0200.03014.45
5.3.100.0170.07713.89
5.3.90.0130.07314.11
5.3.80.0100.04013.92
5.3.70.0130.03713.96
5.3.60.0270.03314.04
5.3.50.0230.04713.92
5.3.40.0230.06013.79
5.3.30.0170.04313.75
5.3.20.0230.05313.52
5.3.10.0100.04013.43
5.3.00.0270.04013.68
5.2.170.0300.02311.35
5.2.160.0170.03311.35
5.2.150.0170.02711.35
5.2.140.0170.03311.35
5.2.130.0070.04011.35
5.2.120.0130.06311.35
5.2.110.0130.03011.35
5.2.100.0170.02711.35
5.2.90.0200.05311.35
5.2.80.0230.05711.35
5.2.70.0230.03311.35
5.2.60.0200.03011.35
5.2.50.0200.05711.35
5.2.40.0200.03011.35
5.2.30.0200.03711.35
5.2.20.0100.03011.35
5.2.10.0070.03311.35
5.2.00.0130.02711.35
5.1.60.0130.03011.35
5.1.50.0100.04711.35
5.1.40.0230.02711.35
5.1.30.0200.03011.35
5.1.20.0100.02711.35
5.1.10.0100.02711.35
5.1.00.0100.02711.35
5.0.50.0070.02011.35
5.0.40.0030.02011.35
5.0.30.0070.03011.35
5.0.20.0030.02011.35
5.0.10.0030.02711.35
5.0.00.0030.03011.35
4.4.90.0100.01711.35
4.4.80.0030.02011.35
4.4.70.0030.01711.35
4.4.60.0100.02011.35
4.4.50.0030.02011.35
4.4.40.0070.02311.35
4.4.30.0070.03711.35
4.4.20.0070.01311.35
4.4.10.0030.01711.35
4.4.00.0130.02011.35
4.3.110.0030.01711.35
4.3.100.0070.01711.35
4.3.90.0070.01311.35
4.3.80.0030.02311.35
4.3.70.0070.01311.35
4.3.60.0070.01311.35
4.3.50.0070.01311.35
4.3.40.0100.02311.35
4.3.30.0000.01711.35
4.3.20.0030.02011.35
4.3.10.0000.01711.35
4.3.00.0030.01311.35

preferences:
42.96 ms | 401 KiB | 5 Q