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; } } $test = new TestClass; var_dump($this->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.0090.00618.30
8.3.50.0110.00418.03
8.3.40.0100.01018.84
8.3.30.0070.01118.84
8.3.20.0040.00420.21
8.3.10.0040.00421.73
8.3.00.0030.00717.50
8.2.180.0090.00616.50
8.2.170.0040.01122.96
8.2.160.0100.00319.33
8.2.150.0080.00024.18
8.2.140.0000.00724.66
8.2.130.0080.00022.22
8.2.120.0080.00026.35
8.2.110.0100.00022.18
8.2.100.0060.00617.78
8.2.90.0040.00417.91
8.2.80.0070.00017.97
8.2.70.0040.00417.50
8.2.60.0040.00418.04
8.2.50.0000.00818.10
8.2.40.0080.00021.94
8.2.30.0000.00719.25
8.2.20.0040.00417.83
8.2.10.0000.00718.05
8.2.00.0040.00418.11
8.1.280.0000.01525.92
8.1.270.0040.00423.99
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0030.00622.60
8.1.230.0070.00420.84
8.1.220.0040.00417.79
8.1.210.0030.00518.77
8.1.200.0060.00317.36
8.1.190.0060.00317.23
8.1.180.0000.00818.10
8.1.170.0050.00318.59
8.1.160.0030.00522.05
8.1.150.0000.00820.68
8.1.140.0000.00719.50
8.1.130.0030.00317.76
8.1.120.0040.00417.49
8.1.110.0040.00417.50
8.1.100.0000.00817.37
8.1.90.0040.00417.46
8.1.80.0040.00417.44
8.1.70.0030.00317.44
8.1.60.0000.00817.51
8.1.50.0000.00817.54
8.1.40.0060.00617.40
8.1.30.0080.00017.56
8.1.20.0070.00017.60
8.1.10.0050.00217.45
8.1.00.0040.00417.52
8.0.300.0050.00219.98
8.0.290.0090.00016.75
8.0.280.0000.00718.43
8.0.270.0040.00417.21
8.0.260.0040.00417.25
8.0.250.0000.00816.88
8.0.240.0040.00417.03
8.0.230.0030.00517.01
8.0.220.0070.00016.87
8.0.210.0000.00816.95
8.0.200.0040.00416.92
8.0.190.0050.00317.04
8.0.180.0040.00416.88
8.0.170.0000.00716.85
8.0.160.0000.00716.93
8.0.150.0070.00016.93
8.0.140.0040.00416.76
8.0.130.0050.00013.31
8.0.120.0040.00416.93
8.0.110.0040.00416.78
8.0.100.0050.00216.95
8.0.90.0080.00016.93
8.0.80.0110.01116.89
8.0.70.0000.00816.86
8.0.60.0040.00416.95
8.0.50.0050.00316.79
8.0.30.0160.00017.30
8.0.20.0140.00617.41
8.0.10.0040.00417.07
8.0.00.0170.00016.70
7.4.330.0020.00215.08
7.4.320.0040.00416.63
7.4.300.0000.00616.51
7.4.290.0050.00316.50
7.4.280.0000.00816.34
7.4.270.0090.00016.51
7.4.260.0070.00316.58
7.4.250.0040.00416.48
7.4.240.0050.00216.44
7.4.230.0070.00016.53
7.4.220.0160.00316.68
7.4.210.0100.00916.63
7.4.200.0070.00016.58
7.4.160.0030.01316.67
7.4.150.0110.00717.40
7.4.140.0060.01317.86
7.4.130.0060.01116.56
7.4.120.0130.00316.49
7.4.110.0120.00616.50
7.4.100.0140.00716.77
7.4.90.0090.01016.71
7.4.80.0040.01419.39
7.4.70.0130.00716.57
7.4.60.0120.00616.47
7.4.50.0060.00916.74
7.4.40.0000.01616.50
7.4.30.0070.01116.62
7.4.00.0070.01014.90
7.3.330.0030.00313.17
7.3.320.0000.00513.12
7.3.310.0030.00316.20
7.3.300.0000.00716.35
7.3.290.0030.00316.13
7.3.280.0090.00716.29
7.3.270.0140.00617.40
7.3.260.0070.00916.47
7.3.250.0110.00616.38
7.3.240.0080.01016.40
7.3.230.0100.00716.44
7.3.210.0070.01116.48
7.3.200.0000.01716.50
7.3.190.0120.00916.25
7.3.180.0080.00816.44
7.3.170.0060.00916.30
7.3.160.0090.01216.38
7.3.120.0130.00714.72
7.3.110.0110.00714.55
7.3.100.0070.01014.80
7.3.90.0030.01314.80
7.3.80.0000.01314.78
7.3.70.0060.00614.92
7.3.60.0110.00414.79
7.3.50.0040.00814.86
7.3.40.0000.01314.78
7.3.30.0080.00814.69
7.3.20.0040.01116.77
7.3.10.0050.00616.59
7.3.00.0070.00516.57
7.2.330.0000.01816.46
7.2.320.0030.02216.58
7.2.310.0030.01316.63
7.2.300.0090.01216.45
7.2.290.0070.01116.44
7.2.250.0060.01315.22
7.2.240.0130.00715.12
7.2.230.0040.00815.04
7.2.220.0000.01214.88
7.2.210.0090.00614.67
7.2.200.0060.00615.13
7.2.190.0060.00914.91
7.2.180.0070.00415.14
7.2.170.0000.01215.05
7.2.130.0070.00316.71
7.2.120.0110.00416.69
7.2.110.0050.00716.69
7.2.100.0030.00816.70
7.2.90.0120.00017.03
7.2.80.0080.00316.66
7.2.70.0040.00816.97
7.2.60.0030.01016.70
7.2.50.0060.00317.02
7.2.40.0030.01016.67
7.2.30.0040.00716.99
7.2.20.0000.01016.88
7.2.10.0000.01417.09
7.2.00.0060.00918.24
7.1.330.0120.00315.57
7.1.320.0090.00315.64
7.1.310.0110.00015.92
7.1.300.0000.01415.76
7.1.290.0110.00015.47
7.1.280.0000.01115.75
7.1.270.0030.01015.65
7.1.260.0050.00315.81
7.1.250.0030.00915.71
7.1.200.0030.00315.71
7.1.100.0030.00617.86
7.1.70.0030.00717.09
7.1.60.0030.00919.29
7.1.50.0030.01716.86
7.1.00.0070.07322.45
7.0.200.0250.00614.45
7.0.80.0400.06719.91
7.0.70.0700.08020.02
7.0.60.0400.05319.84
7.0.50.0500.05020.35
7.0.40.0470.07020.33
7.0.30.0800.06020.38
7.0.20.0630.06720.32
7.0.10.0730.06720.20
7.0.00.0770.06320.34
5.6.230.0170.09720.81
5.6.220.0100.06320.67
5.6.210.0130.07320.57
5.6.200.0070.07321.13
5.6.190.0070.06321.02
5.6.180.0170.05321.09
5.6.170.0130.06321.20
5.6.160.0300.06721.18
5.6.150.0230.07721.07
5.6.140.0170.05321.15
5.6.130.0070.07021.13
5.6.120.0200.06021.20
5.6.110.0300.06721.17
5.6.100.0170.05321.16
5.6.90.0230.05321.18
5.6.80.0170.05320.48
5.6.70.0200.05720.62
5.6.60.0200.05020.47
5.6.50.0130.05320.44
5.6.40.0230.04320.39
5.6.30.0130.05020.49
5.6.20.0070.06020.50
5.6.10.0270.04020.43
5.6.00.0130.05720.44
5.5.370.0230.05020.52
5.5.360.0130.06320.41
5.5.350.0170.05720.45
5.5.340.0170.05320.68
5.5.330.0070.06720.93
5.5.320.0100.06720.84
5.5.310.0130.08020.93
5.5.300.0100.06020.98
5.5.290.0070.07020.95
5.5.280.0170.06020.91
5.5.270.0030.06720.70
5.5.260.0130.06020.82
5.5.250.0170.05320.65
5.5.240.0100.05720.29
5.5.230.0200.04720.27
5.5.220.0170.05020.26
5.5.210.0130.05020.27
5.5.200.0130.06320.33
5.5.190.0070.06720.27
5.5.180.0130.05320.32
5.5.160.0170.06720.25
5.5.150.0070.05720.06
5.5.140.0130.05320.30
5.5.130.0070.05720.21
5.5.120.0130.05720.06
5.5.110.0170.05020.27
5.5.100.0030.06320.07
5.5.90.0170.04720.18
5.5.80.0100.05720.10
5.5.70.0100.05720.09
5.5.60.0200.04320.06
5.5.50.0100.05320.18
5.5.40.0030.06020.21
5.5.30.0200.05020.14
5.5.20.0200.05020.00
5.5.10.0100.05720.10
5.5.00.0070.06320.05

preferences:
30.01 ms | 400 KiB | 5 Q