3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface TestInterface { public function test(): TestInterface; } trait TestTrait { public function test(): TestInterface { return $this; } } class TestClass implements TestInterface { use TestTrait; public function test2() : self { return $this; } } class TestClass2 extends TestClass {} $test = new TestClass; $test2 = new TestClass2; var_dump($test->test(), $test2->test2());

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.00918.56
8.3.50.0080.01022.79
8.3.40.0150.00018.84
8.3.30.0070.00718.38
8.3.20.0080.00020.46
8.3.10.0040.00423.70
8.3.00.0040.00717.50
8.2.180.0070.00718.54
8.2.170.0070.01422.96
8.2.160.0110.00419.45
8.2.150.0030.00524.18
8.2.140.0060.00324.66
8.2.130.0040.00422.13
8.2.120.0050.00226.35
8.2.110.0050.00521.02
8.2.100.0070.00418.03
8.2.90.0050.00319.05
8.2.80.0030.00517.97
8.2.70.0080.00017.61
8.2.60.0090.00018.05
8.2.50.0070.00018.10
8.2.40.0000.00822.03
8.2.30.0040.00419.07
8.2.20.0050.00217.60
8.2.10.0000.00917.98
8.2.00.0000.00717.94
8.1.280.0090.00925.92
8.1.270.0060.00323.88
8.1.260.0070.00028.09
8.1.250.0050.00328.09
8.1.240.0030.00621.38
8.1.230.0080.00417.95
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0000.00817.23
8.1.180.0030.00618.10
8.1.170.0080.00018.46
8.1.160.0040.00322.09
8.1.150.0000.00720.68
8.1.140.0000.00719.58
8.1.130.0000.00717.61
8.1.120.0050.00217.36
8.1.110.0050.00317.44
8.1.100.0080.00017.38
8.1.90.0070.00017.49
8.1.80.0040.00417.46
8.1.70.0070.00017.49
8.1.60.0040.00417.59
8.1.50.0000.00817.43
8.1.40.0060.00617.41
8.1.30.0080.00017.59
8.1.20.0040.00417.70
8.1.10.0040.00417.38
8.1.00.0000.00717.42
8.0.300.0080.00018.77
8.0.290.0070.00016.75
8.0.280.0030.00318.43
8.0.270.0000.00817.18
8.0.260.0030.00317.20
8.0.250.0000.00716.90
8.0.240.0060.00316.90
8.0.230.0000.00816.83
8.0.220.0040.00416.81
8.0.210.0040.00416.85
8.0.200.0050.00216.91
8.0.190.0050.00316.95
8.0.180.0050.00316.88
8.0.170.0000.00816.87
8.0.160.0030.00316.88
8.0.150.0000.00716.92
8.0.140.0000.00716.73
8.0.130.0000.00513.37
8.0.120.0000.00816.77
8.0.110.0070.00016.90
8.0.100.0030.00516.83
8.0.90.0000.00716.77
8.0.80.0060.00916.84
8.0.70.0070.00016.79
8.0.60.0000.00716.86
8.0.50.0050.00216.93
8.0.30.0090.00717.10
8.0.20.0060.01417.40
8.0.10.0000.00816.95
8.0.00.0060.01216.75
7.4.330.0000.00515.08
7.4.320.0030.00316.60
7.4.300.0070.00016.62
7.4.290.0030.00316.50
7.4.280.0000.00716.42
7.4.270.0100.00016.63
7.4.260.0070.00316.48
7.4.250.0030.00316.55
7.4.240.0000.00716.53
7.4.230.0070.00016.44
7.4.220.0140.00716.69
7.4.210.0070.01016.60
7.4.200.0040.00416.63
7.4.160.0030.02016.48
7.4.150.0120.00617.40
7.4.140.0160.00517.86
7.4.130.0140.00516.47
7.4.120.0060.01416.47
7.4.110.0030.01416.32
7.4.100.0030.01316.46
7.4.90.0100.00716.48
7.4.80.0000.02019.39
7.4.70.0100.01316.50
7.4.60.0140.00316.58
7.4.50.0060.00616.53
7.4.40.0090.01216.41
7.4.30.0080.00916.50
7.4.00.0070.01114.91
7.3.330.0000.00513.32
7.3.320.0000.00513.32
7.3.310.0030.00316.26
7.3.300.0040.00416.16
7.3.290.0000.00716.18
7.3.280.0040.01116.31
7.3.270.0110.00617.40
7.3.260.0130.00716.35
7.3.250.0050.01416.49
7.3.240.0100.00816.35
7.3.230.0030.01316.39
7.3.210.0070.01416.16
7.3.200.0140.00316.23
7.3.190.0100.00616.60
7.3.180.0030.01316.25
7.3.170.0120.00616.23
7.3.160.0260.01616.56
7.3.120.0000.01614.88
7.3.110.0070.00714.50
7.3.100.0030.00714.75
7.3.90.0110.00714.71
7.3.80.0070.00714.84
7.3.70.0100.00714.81
7.3.60.0100.00314.59
7.3.50.0100.00714.75
7.3.40.0040.01114.49
7.3.30.0030.01314.87
7.3.20.0000.01316.60
7.3.10.0060.00616.71
7.3.00.0060.00516.51
7.2.330.0030.01316.38
7.2.320.0160.00716.65
7.2.310.0120.00616.29
7.2.300.0080.00816.74
7.2.290.0090.00916.75
7.2.240.0030.01215.17
7.2.230.0110.00714.89
7.2.220.0060.00615.04
7.2.210.0000.01315.13
7.2.200.0030.01215.09
7.2.190.0000.00914.89
7.2.180.0070.00714.77
7.2.170.0030.01414.84
7.2.160.0000.01814.98
7.2.150.0000.01416.80
7.2.140.0030.01216.84
7.2.130.0090.00916.66
7.2.120.0080.00616.84
7.2.110.0050.01016.63
7.2.100.0080.00716.74
7.2.90.0080.00916.77
7.2.80.0080.01016.75
7.2.70.0070.00716.68
7.2.60.0060.00916.71
7.2.50.0050.00816.70
7.2.40.0090.00516.76
7.2.30.0070.00716.67
7.2.20.0020.01316.95
7.2.10.0050.01016.67
7.2.00.0060.00817.60
7.1.330.0050.00815.53
7.1.320.0110.00015.62
7.1.310.0060.00615.80
7.1.300.0040.00715.68
7.1.290.0030.01015.56
7.1.280.0000.01115.68
7.1.270.0030.00515.70
7.1.260.0100.00315.78
7.1.250.0040.01115.73
7.1.200.0080.00415.90
7.1.100.0170.01017.79
7.1.70.0050.00217.29
7.1.60.0030.00719.29
7.1.50.0030.01916.88
7.1.00.0070.07322.30
7.0.200.0290.01014.55
7.0.80.0130.05719.93
7.0.70.0200.05320.20
7.0.60.0130.05720.01
7.0.50.0070.06020.29
7.0.40.0130.05320.25
7.0.30.0070.06720.32
7.0.20.0100.06320.43
7.0.10.0130.05720.26
7.0.00.0170.05720.43
5.6.230.0130.05720.51
5.6.220.0100.05720.75
5.6.210.0170.05720.88
5.6.200.0230.04721.11
5.6.190.0100.06021.20
5.6.180.0200.05721.10
5.6.170.0130.05721.13
5.6.160.0030.06721.10
5.6.150.0270.05021.18
5.6.140.0270.04721.11
5.6.130.0100.06321.11
5.6.120.0130.06721.08
5.6.110.0130.07721.13
5.6.100.0170.07021.13
5.6.90.0100.06021.06
5.6.80.0100.05720.51
5.6.70.0100.06320.51
5.6.60.0070.06320.46
5.6.50.0070.07020.59
5.6.40.0070.07020.54
5.6.30.0100.06020.43
5.6.20.0170.05020.38
5.6.10.0270.04720.55
5.6.00.0070.06020.41
5.5.370.0000.06320.42
5.5.360.0200.05320.45
5.5.350.0170.05320.46
5.5.340.0100.06020.71
5.5.330.0130.05320.90
5.5.320.0070.06320.88
5.5.310.0200.05320.86
5.5.300.0100.06020.88
5.5.290.0100.06020.95
5.5.280.0130.06320.84
5.5.270.0230.05020.95
5.5.260.0100.06720.82
5.5.250.0170.05320.76
5.5.240.0200.04720.36
5.5.230.0170.05020.33
5.5.220.0100.06020.15
5.5.210.0100.05720.27
5.5.200.0070.06020.26
5.5.190.0170.07720.19
5.5.180.0070.06720.21
5.5.160.0130.05720.18
5.5.150.0170.05320.27
5.5.140.0130.05320.18
5.5.130.0030.06320.26
5.5.120.0170.05020.23
5.5.110.0130.05320.12
5.5.100.0100.06320.18
5.5.90.0070.05720.23
5.5.80.0130.05020.23
5.5.70.0070.06320.21
5.5.60.0100.05719.97
5.5.50.0230.06320.08
5.5.40.0170.06020.16
5.5.30.0230.05020.05
5.5.20.0100.06020.00
5.5.10.0200.05320.14
5.5.00.0170.06020.09

preferences:
50.34 ms | 401 KiB | 5 Q