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($test->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.60.0040.01218.55
8.3.50.0130.00521.97
8.3.40.0070.00718.67
8.3.30.0140.00418.77
8.3.20.0040.00420.38
8.3.10.0000.00721.95
8.3.00.0070.00417.59
8.2.180.0130.00316.50
8.2.170.0000.01422.96
8.2.160.0100.00319.41
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0040.00422.30
8.2.120.0040.00426.35
8.2.110.0030.00722.13
8.2.100.0040.00817.84
8.2.90.0050.00318.03
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0030.00617.93
8.2.50.0040.00418.10
8.2.40.0090.00022.29
8.2.30.0050.00319.12
8.2.20.0060.00317.77
8.2.10.0000.00818.16
8.2.00.0000.00717.98
8.1.280.0120.00325.92
8.1.270.0080.00023.79
8.1.260.0000.00728.09
8.1.250.0040.00428.09
8.1.240.0040.00422.61
8.1.230.0030.00920.97
8.1.220.0080.00017.74
8.1.210.0060.00318.91
8.1.200.0030.00617.36
8.1.190.0000.00817.23
8.1.180.0000.00818.10
8.1.170.0050.00318.51
8.1.160.0050.00322.10
8.1.150.0050.00220.67
8.1.140.0040.00419.57
8.1.130.0000.00717.66
8.1.120.0040.00417.43
8.1.110.0000.00817.36
8.1.100.0030.00517.38
8.1.90.0000.00717.33
8.1.80.0000.00817.35
8.1.70.0000.00717.34
8.1.60.0030.00617.48
8.1.50.0030.00617.58
8.1.40.0060.00317.46
8.1.30.0080.00017.61
8.1.20.0040.00417.69
8.1.10.0050.00217.43
8.1.00.0080.00017.50
8.0.300.0070.00019.98
8.0.290.0000.00716.75
8.0.280.0030.00518.45
8.0.270.0030.00517.30
8.0.260.0060.00017.26
8.0.250.0030.00316.98
8.0.240.0040.00417.07
8.0.230.0030.00617.00
8.0.220.0070.00017.03
8.0.210.0040.00416.93
8.0.200.0000.00616.90
8.0.190.0030.00517.04
8.0.180.0000.00816.98
8.0.170.0000.00817.01
8.0.160.0050.00317.03
8.0.150.0070.00016.87
8.0.140.0040.00416.95
8.0.130.0000.00513.38
8.0.120.0030.00516.97
8.0.110.0070.00016.83
8.0.100.0040.00416.86
8.0.90.0040.00416.94
8.0.80.0030.01716.91
8.0.70.0030.00516.90
8.0.60.0040.00416.98
8.0.50.0040.00416.73
8.0.30.0080.01116.95
8.0.20.0130.00717.40
8.0.10.0080.00017.13
8.0.00.0040.01216.93
7.4.330.0000.00515.08
7.4.320.0000.00716.48
7.4.300.0030.00316.43
7.4.290.0040.00416.58
7.4.280.0050.00316.54
7.4.270.0040.00716.58
7.4.260.0000.00716.57
7.4.250.0000.00716.61
7.4.240.0050.00216.43
7.4.230.0030.00316.34
7.4.220.0030.02416.46
7.4.210.0080.00916.51
7.4.200.0000.00716.40
7.4.160.0150.00316.56
7.4.150.0130.00517.40
7.4.140.0100.01117.86
7.4.130.0080.01116.59
7.4.120.0100.01016.62
7.4.110.0090.00716.38
7.4.100.0140.00316.42
7.4.90.0090.00916.63
7.4.80.0070.01119.39
7.4.70.0070.01516.38
7.4.60.0090.00916.52
7.4.50.0030.01316.36
7.4.40.0140.00316.40
7.4.30.0030.02016.54
7.4.00.0070.00915.02
7.3.330.0030.00313.15
7.3.320.0050.00013.23
7.3.310.0040.00416.23
7.3.300.0000.00616.32
7.3.290.0000.00716.25
7.3.280.0110.00816.37
7.3.270.0040.01317.40
7.3.260.0090.01116.47
7.3.250.0090.00816.44
7.3.240.0130.00816.32
7.3.230.0070.01116.55
7.3.210.0150.00616.37
7.3.200.0080.00816.47
7.3.190.0080.00816.39
7.3.180.0140.00416.48
7.3.170.0160.00016.54
7.3.160.0130.00716.31
7.3.120.0080.00914.78
7.3.110.0090.00714.88
7.3.100.0080.00614.94
7.3.90.0080.00614.86
7.3.80.0070.00814.76
7.3.70.0080.00714.81
7.3.60.0090.00714.72
7.3.50.0030.01014.84
7.3.40.0080.00814.76
7.3.30.0040.01014.74
7.3.20.0060.00916.62
7.3.10.0060.00716.59
7.3.00.0080.00616.57
7.2.330.0070.01116.50
7.2.320.0060.01616.39
7.2.310.0130.00316.80
7.2.300.0110.01116.61
7.2.290.0100.01016.44
7.2.250.0060.01514.88
7.2.240.0050.01314.94
7.2.230.0080.01014.99
7.2.220.0060.00715.08
7.2.210.0080.00714.78
7.2.200.0060.00914.90
7.2.190.0070.00815.03
7.2.180.0050.00914.97
7.2.170.0090.00514.91
7.2.60.0080.00816.90
7.2.00.0060.00619.18
7.1.330.0020.01215.84
7.1.320.0040.00715.80
7.1.310.0070.00715.71
7.1.300.0050.00715.70
7.1.290.0050.00915.77
7.1.280.0040.00915.73
7.1.270.0040.00815.70
7.1.260.0040.00915.74
7.1.200.0030.01315.70
7.1.100.0030.00618.18
7.1.70.0040.00717.24
7.1.60.0170.00019.29
7.1.50.0120.00617.05
7.1.00.0000.08022.54
7.0.200.0400.00314.43
7.0.80.1170.05719.89
7.0.70.0070.06320.19
7.0.60.0200.05020.04
7.0.50.0100.06020.35
7.0.40.0230.04720.30
7.0.30.0170.06320.36
7.0.20.1500.06020.34
7.0.10.1400.06320.37
7.0.00.0870.06320.19
5.6.230.0100.05720.64
5.6.220.0100.06020.73
5.6.210.0130.05720.74
5.6.200.0130.07021.21
5.6.190.0200.05021.16
5.6.180.0200.05021.11
5.6.170.0270.06321.12
5.6.160.0130.05321.16
5.6.150.0070.06021.05
5.6.140.0130.05721.11
5.6.130.0070.06321.09
5.6.120.0130.06021.16
5.6.110.0200.05021.08
5.6.100.0130.05321.11
5.6.90.0230.04721.05
5.6.80.0130.05320.46
5.6.70.0100.05720.46
5.6.60.0070.05720.44
5.6.50.0130.05320.56
5.6.40.0170.05020.49
5.6.30.0100.05720.45
5.6.20.0100.07020.45
5.6.10.0130.05320.56
5.6.00.0100.05720.43
5.5.370.0100.05720.41
5.5.360.0100.06320.43
5.5.350.0230.05020.39
5.5.340.0130.05720.87
5.5.330.0070.06020.97
5.5.320.0170.05020.94
5.5.310.0170.07020.93
5.5.300.0070.06020.84
5.5.290.0100.06020.93
5.5.280.0130.05720.96
5.5.270.0130.06020.93
5.5.260.0170.05720.69
5.5.250.0100.06020.60
5.5.240.0100.05720.28
5.5.230.0100.06020.18
5.5.220.0070.05720.19
5.5.210.0100.05720.30
5.5.200.0070.06020.33
5.5.190.0170.05320.16
5.5.180.0230.04720.33
5.5.160.0170.05020.31
5.5.150.0100.06020.32
5.5.140.0100.05720.19
5.5.130.0200.05020.19
5.5.120.0070.05720.23
5.5.110.0170.05320.27
5.5.100.0130.05320.17
5.5.90.0100.05319.96
5.5.80.0100.05320.01
5.5.70.0130.05320.09
5.5.60.0100.05720.06
5.5.50.0070.06020.01
5.5.40.0170.04720.15
5.5.30.0170.04720.00
5.5.20.0100.05720.21
5.5.10.0130.05320.09
5.5.00.0130.05020.17

preferences:
34.31 ms | 401 KiB | 5 Q