3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace foo { trait A { function x() { var_dump(self::class); } } class Q { use \foo\A; } class R extends Q {} } namespace { class B { use \foo\A; } class C { use \foo\A; } class D extends C {} function main() { (new B)->x(); (new C)->x(); (new D)->x(); (new Q)->x(); (new R)->x(); } main(); }

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.0140.00516.88
8.3.50.0120.00318.04
8.3.40.0040.01118.80
8.3.30.0120.00318.66
8.3.20.0000.00820.35
8.3.10.0050.00323.60
8.3.00.0080.00019.82
8.2.180.0030.01616.50
8.2.170.0140.00722.96
8.2.160.0140.00020.47
8.2.150.0090.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00419.22
8.2.120.0050.00326.35
8.2.110.0030.00620.58
8.2.100.0080.00418.05
8.2.90.0000.00819.10
8.2.80.0040.00417.97
8.2.70.0000.00917.63
8.2.60.0050.00317.79
8.2.50.0080.00018.07
8.2.40.0040.00422.21
8.2.30.0070.00020.54
8.2.20.0030.00517.62
8.2.10.0040.00418.06
8.2.00.0040.00418.17
8.1.280.0030.01425.92
8.1.270.0000.00820.25
8.1.260.0030.00528.09
8.1.250.0040.00428.09
8.1.240.0060.00323.92
8.1.230.0110.00017.64
8.1.220.0000.00817.74
8.1.210.0070.00318.77
8.1.200.0000.00817.35
8.1.190.0060.00317.22
8.1.180.0000.00818.10
8.1.170.0040.00418.50
8.1.160.0040.00420.70
8.1.150.0070.00018.91
8.1.140.0050.00319.56
8.1.130.0000.00717.64
8.1.120.0000.00717.42
8.1.110.0040.00417.39
8.1.100.0000.00717.45
8.1.90.0040.00417.35
8.1.80.0050.00317.29
8.1.70.0000.00717.22
8.1.60.0070.00017.41
8.1.50.0030.00617.52
8.1.40.0070.00317.49
8.1.30.0030.00517.60
8.1.20.0000.00717.52
8.1.10.0060.00317.49
8.1.00.0070.00017.44
8.0.300.0040.00418.77
8.0.290.0000.00816.75
8.0.280.0030.00318.44
8.0.270.0030.00317.20
8.0.260.0030.00317.13
8.0.250.0000.00717.05
8.0.240.0030.00516.91
8.0.230.0000.00817.06
8.0.220.0030.00616.86
8.0.210.0050.00316.89
8.0.200.0000.00716.88
8.0.190.0000.01016.90
8.0.180.0030.00516.98
8.0.170.0030.00516.88
8.0.160.0040.00417.00
8.0.150.0040.00416.85
8.0.140.0030.00316.91
8.0.130.0070.00013.36
8.0.120.0000.00816.83
8.0.110.0040.00416.77
8.0.100.0070.00016.90
8.0.90.0000.00716.77
8.0.80.0080.00816.89
8.0.70.0030.00516.91
8.0.60.0080.00016.93
8.0.50.0070.00016.92
8.0.30.0110.00917.07
8.0.20.0120.00817.40
8.0.10.0050.00317.02
8.0.00.0090.00816.65
7.4.330.0050.00016.84
7.4.320.0000.00616.49
7.4.300.0040.00416.43
7.4.290.0070.00316.52
7.4.280.0030.00516.45
7.4.270.0000.00716.55
7.4.260.0000.00716.38
7.4.250.0050.00216.46
7.4.240.0030.00416.42
7.4.230.0030.00316.56
7.4.220.0040.01516.48
7.4.210.0140.00316.57
7.4.200.0070.00016.61
7.4.160.0140.00016.33
7.4.150.0070.01417.40
7.4.140.0140.00617.86
7.4.130.0070.00916.45
7.4.120.0090.01016.39
7.4.110.0130.00716.56
7.4.100.0120.00616.39
7.4.90.0090.00916.63
7.4.80.0110.00719.39
7.4.70.0130.00316.28
7.4.60.0110.00716.58
7.4.50.0080.00616.48
7.4.40.0150.00316.57
7.4.30.0100.00716.43
7.4.00.0080.00814.99
7.3.330.0000.00513.33
7.3.320.0030.00313.40
7.3.310.0050.00316.27
7.3.300.0030.00316.27
7.3.290.0100.00616.37
7.3.280.0120.00716.37
7.3.270.0090.00917.40
7.3.260.0090.00916.49
7.3.250.0070.01116.49
7.3.240.0080.01016.44
7.3.230.0130.01316.54
7.3.210.0120.00316.40
7.3.200.0060.01016.34
7.3.190.0090.01216.41
7.3.180.0070.01016.44
7.3.170.0130.00616.43
7.3.160.0100.01016.41
7.3.120.0100.01014.84
7.3.110.0110.00714.96
7.3.100.0090.00314.77
7.3.90.0070.01015.07
7.3.80.0100.00314.63
7.3.70.0070.00714.70
7.3.60.0000.01214.80
7.3.50.0060.00314.85
7.3.40.0000.01114.89
7.3.30.0070.00714.73
7.3.20.0090.00916.52
7.3.10.0080.00316.62
7.3.00.0090.00616.53
7.2.330.0030.01416.58
7.2.320.0060.01016.32
7.2.310.0100.01316.34
7.2.300.0090.01216.57
7.2.290.0120.00916.46
7.2.250.0090.00915.16
7.2.240.0070.01414.82
7.2.230.0060.01015.21
7.2.220.0100.00314.92
7.2.210.0000.01415.00
7.2.200.0030.00814.89
7.2.190.0000.01714.98
7.2.180.0120.00314.81
7.2.170.0130.00315.00
7.2.130.0070.01116.73
7.2.120.0080.00816.88
7.2.110.0100.00716.81
7.2.100.0090.00316.75
7.2.90.0060.00616.83
7.2.80.0050.00516.59
7.2.70.0030.00916.99
7.2.60.0080.00716.75
7.2.50.0030.01016.82
7.2.40.0030.00716.69
7.2.30.0090.00616.84
7.2.20.0080.00516.66
7.2.10.0040.00816.82
7.2.00.0070.01117.99
7.1.330.0100.00315.40
7.1.320.0030.01015.68
7.1.310.0030.01015.86
7.1.300.0090.00615.44
7.1.290.0030.01015.39
7.1.280.0130.00015.75
7.1.270.0110.00415.87
7.1.260.0000.01415.45
7.1.250.0060.01015.71
7.1.200.0000.01215.70
7.1.100.0060.00618.24
7.1.70.0020.00516.80
7.1.60.0030.01819.44
7.1.50.0030.02116.57
7.1.00.0100.06722.36
7.0.200.0080.00016.75
7.0.60.0130.06720.04
7.0.50.0070.06317.90
7.0.40.0100.04020.13
7.0.30.0370.04020.21
7.0.20.0330.07720.16
7.0.10.0030.09320.10
7.0.00.0170.08020.23
5.6.280.0000.03720.94
5.6.210.0100.07020.78
5.6.200.0030.04318.18
5.6.190.0130.08320.57
5.6.180.0200.06020.55
5.6.170.0200.07720.40
5.6.160.0070.07720.48
5.6.150.0030.05718.20
5.6.140.0030.08318.18
5.6.130.0130.03718.21
5.6.120.0030.08321.05
5.6.110.0170.08720.90
5.6.100.0130.08020.99
5.6.90.0030.04721.11
5.6.80.0030.07320.39
5.5.350.0070.09020.42
5.5.340.0030.08317.98
5.5.330.0100.08320.25
5.5.320.0470.04720.33
5.5.310.0230.05720.32
5.5.300.0000.08318.08
5.5.290.0070.08317.97
5.5.280.0030.04320.79
5.5.270.0130.08020.66
5.5.260.0030.04320.80
5.5.250.0030.09020.70
5.5.240.4200.04020.36

preferences:
53.22 ms | 401 KiB | 5 Q