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() : TestClass { return $this; } } $test = new TestClass; var_dump($this->test(), $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.40.0150.00618.61
8.3.30.0110.00418.71
8.3.20.0080.00020.16
8.3.10.0000.00821.52
8.3.00.0060.00617.63
8.2.170.0130.00322.96
8.2.160.0070.00719.50
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00422.19
8.2.120.0070.00026.35
8.2.110.0070.00321.93
8.2.100.0040.00817.68
8.2.90.0030.00617.97
8.2.80.0000.00717.97
8.2.70.0090.00017.50
8.2.60.0040.00417.80
8.2.50.0040.00418.10
8.2.40.0040.00422.30
8.2.30.0040.00419.15
8.2.20.0080.00017.85
8.2.10.0040.00417.96
8.2.00.0040.00417.93
8.1.270.0000.00823.99
8.1.260.0070.00028.09
8.1.250.0050.00228.09
8.1.240.0040.00422.48
8.1.230.0080.00420.99
8.1.220.0090.00017.74
8.1.210.0000.00919.04
8.1.200.0090.00017.36
8.1.190.0000.00817.35
8.1.180.0050.00218.10
8.1.170.0080.00018.54
8.1.160.0080.00022.20
8.1.150.0040.00420.67
8.1.140.0070.00019.49
8.1.130.0070.00017.74
8.1.120.0040.00317.43
8.1.110.0000.00817.45
8.1.100.0040.00417.45
8.1.90.0040.00417.36
8.1.80.0050.00317.52
8.1.70.0000.00717.43
8.1.60.0070.00017.54
8.1.50.0030.00517.47
8.1.40.0030.00717.57
8.1.30.0040.00417.54
8.1.20.0060.00317.59
8.1.10.0000.00817.58
8.1.00.0040.00417.41
8.0.300.0000.00719.99
8.0.290.0040.00416.88
8.0.280.0050.00218.43
8.0.270.0030.00317.26
8.0.260.0070.00017.26
8.0.250.0030.00317.05
8.0.240.0050.00316.88
8.0.230.0040.00416.98
8.0.220.0000.00817.03
8.0.210.0000.00816.98
8.0.200.0030.00317.00
8.0.190.0050.00316.89
8.0.180.0030.00516.86
8.0.170.0040.00416.97
8.0.160.0000.00716.97
8.0.150.0040.00416.82
8.0.140.0070.00016.82
8.0.130.0060.00013.34
8.0.120.0030.00616.89
8.0.110.0000.00716.89
8.0.100.0080.00017.06
8.0.90.0030.00516.82
8.0.80.0040.01216.90
8.0.70.0080.00016.80
8.0.60.0040.00417.00
8.0.50.0060.00317.05
8.0.30.0120.00717.06
8.0.20.0100.00817.40
8.0.10.0050.00217.09
8.0.00.0100.00716.77
7.4.330.0000.00515.08
7.4.320.0000.00616.55
7.4.300.0060.00016.61
7.4.290.0000.00816.47
7.4.280.0000.00816.48
7.4.270.0030.00716.60
7.4.260.0000.00816.49
7.4.250.0040.00416.41
7.4.240.0030.00316.50
7.4.230.0000.00816.57
7.4.220.0080.01116.48
7.4.210.0080.01016.52
7.4.200.0040.00416.43
7.4.160.0050.01016.66
7.4.150.0140.00417.40
7.4.140.0090.00817.86
7.4.130.0120.00616.57
7.4.120.0120.00516.54
7.4.110.0100.00716.71
7.4.100.0100.00616.41
7.4.90.0070.01116.51
7.4.80.0080.00819.39
7.4.70.0060.01016.46
7.4.60.0070.01016.57
7.4.50.0060.00916.68
7.4.40.0060.01316.58
7.4.30.0060.01116.50
7.4.00.0030.01414.96
7.3.330.0000.00613.11
7.3.320.0030.00313.09
7.3.310.0000.00716.18
7.3.300.0000.00716.17
7.3.290.0000.00716.21
7.3.280.0100.00916.30
7.3.270.0100.00717.40
7.3.260.0050.01116.46
7.3.250.0070.01116.58
7.3.240.0150.00316.55
7.3.230.0100.00616.48
7.3.210.0110.00716.46
7.3.200.0130.00416.38
7.3.190.0060.00916.48
7.3.180.0070.00916.58
7.3.170.0060.00916.34
7.3.160.0110.00516.38
7.3.10.0070.00416.60
7.3.00.0060.01016.61
7.2.330.0100.00716.37
7.2.320.0100.01016.67
7.2.310.0070.01016.64
7.2.300.0040.02116.51
7.2.290.0150.00816.45
7.2.130.0070.00416.84
7.2.120.0000.01416.72
7.2.110.0100.00016.88
7.2.100.0030.01016.73
7.2.90.0070.01016.97
7.2.80.0090.00616.89
7.2.70.0000.00916.91
7.2.60.0080.00316.88
7.2.50.0030.00617.06
7.2.40.0060.00916.50
7.2.30.0060.00916.81
7.2.20.0060.00616.65
7.2.10.0040.00416.68
7.2.00.0060.00718.16
7.1.250.0000.00715.68
7.1.200.0040.00815.61
7.1.100.0000.01118.22
7.1.70.0040.00416.81
7.1.60.0070.00719.29
7.1.50.0100.01316.71
7.1.00.0030.07722.27
7.0.200.0210.00314.79
7.0.80.0130.05720.21
7.0.70.0070.06319.96
7.0.60.0270.06720.00
7.0.50.0130.06020.39
7.0.40.0100.06020.30
7.0.30.0130.06320.34
7.0.20.0130.07720.38
7.0.10.0170.05720.26
7.0.00.0100.06720.20
5.6.230.0070.06320.82
5.6.220.0200.05320.55
5.6.210.0230.05020.87
5.6.200.0000.07021.03
5.6.190.0100.06021.18
5.6.180.0130.06021.13
5.6.170.0130.05721.11
5.6.160.0130.07721.18
5.6.150.0130.05721.05
5.6.140.0170.05721.02
5.6.130.0200.06721.03
5.6.120.0100.06321.18
5.6.110.0070.06721.03
5.6.100.0170.05321.14
5.6.90.0130.06321.04
5.6.80.0100.07320.40
5.6.70.0170.05020.48
5.6.60.0100.05720.46
5.6.50.0100.05720.49
5.6.40.0170.05320.43
5.6.30.0100.05720.39
5.6.20.0230.04020.45
5.6.10.0200.04320.44
5.6.00.0100.05320.44
5.5.370.0030.06320.61
5.5.360.0030.06720.41
5.5.350.0300.06720.45
5.5.340.0070.06020.97
5.5.330.0070.06720.71
5.5.320.0070.06020.97
5.5.310.0070.06720.78
5.5.300.0070.08320.93
5.5.290.0230.04720.89
5.5.280.0170.06020.71
5.5.270.0070.06720.77
5.5.260.0100.07020.94
5.5.250.0200.06320.68
5.5.240.0130.05320.32
5.5.230.0230.04720.24
5.5.220.0200.07020.36
5.5.210.0230.06720.30
5.5.200.0100.05720.25
5.5.190.0230.04320.21
5.5.180.0030.06720.26
5.5.160.0170.05020.19
5.5.150.0070.06020.32
5.5.140.0170.04720.30
5.5.130.0170.05020.24
5.5.120.0230.04020.30
5.5.110.0100.05720.18
5.5.100.0230.04320.18
5.5.90.0100.05320.16
5.5.80.0100.05320.18
5.5.70.0170.05020.08
5.5.60.0130.05320.13
5.5.50.0170.05020.15
5.5.40.0100.05320.07
5.5.30.0130.05020.12
5.5.20.0100.06020.11
5.5.10.0100.05720.18
5.5.00.0100.05720.18

preferences:
60.66 ms | 400 KiB | 5 Q