3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface OriginalContract { } interface MoreSpecificContract extends OriginalContract { } class Foo { public function baz(OriginalContract $item) {} } class Bar extends Foo { public function baz(MoreSpecificContract $item) {} } /* I actually want Bar to accept only instances of MoreSpecificContract But for polymorphism, since it extends OriginalContract, it should be valid imho The only way I can now do this is class Bar extends Foo { public function baz(OriginalContract $item) { if (($item instanceof MoreSpecificContract) === false) { throw new Exception("Expected something more specific"); } // do some more specific stuff } } */

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.00916.38
8.3.50.0080.01121.20
8.3.40.0150.00018.48
8.3.30.0070.00718.41
8.3.20.0190.00020.21
8.3.10.0040.00421.73
8.3.00.0080.00019.56
8.2.180.0140.00716.38
8.2.170.0130.00722.96
8.2.160.0140.00020.08
8.2.150.0080.00024.18
8.2.140.0140.00024.66
8.2.130.0080.00026.16
8.2.120.0000.00817.63
8.2.110.0030.00620.40
8.2.100.0080.00417.84
8.2.90.0000.00819.23
8.2.80.0080.00017.97
8.2.70.0000.00817.50
8.2.60.0040.00417.80
8.2.50.0000.01118.07
8.2.40.0080.00021.18
8.2.30.0000.00719.74
8.2.20.0030.00617.63
8.2.10.0000.00717.87
8.2.00.0000.00817.90
8.1.280.0100.00725.92
8.1.270.0030.01520.38
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00621.99
8.1.230.0110.00420.93
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0000.00917.23
8.1.190.0040.00417.00
8.1.180.0040.00418.10
8.1.170.0000.00818.46
8.1.160.0000.00821.93
8.1.150.0050.00218.83
8.1.140.0000.00817.39
8.1.130.0030.00317.63
8.1.120.0040.00417.47
8.1.110.0050.00317.34
8.1.100.0040.00417.25
8.1.90.0040.00417.42
8.1.80.0040.00417.43
8.1.70.0000.00817.37
8.1.60.0040.00417.48
8.1.50.0040.00417.52
8.1.40.0030.00617.43
8.1.30.0060.00617.46
8.1.20.0000.00817.55
8.1.10.0000.00717.38
8.1.00.0040.00417.30
8.0.300.0000.00718.77
8.0.290.0000.00716.75
8.0.280.0000.00718.26
8.0.270.0030.00317.08
8.0.260.0030.00317.10
8.0.250.0050.00216.88
8.0.240.0000.00716.98
8.0.230.0070.00016.82
8.0.220.0070.00016.81
8.0.210.0080.00016.82
8.0.200.0030.00316.94
8.0.190.0040.00416.98
8.0.180.0000.00716.94
8.0.170.0040.00416.90
8.0.160.0040.00416.80
8.0.150.0000.00716.74
8.0.140.0000.00716.87
8.0.130.0030.00313.20
8.0.120.0000.00716.75
8.0.110.0040.00416.84
8.0.100.0040.00416.77
8.0.90.0000.00716.90
8.0.80.0080.00716.84
8.0.70.0050.00216.87
8.0.60.0070.00016.84
8.0.50.0050.00316.77
8.0.30.0100.00816.84
8.0.20.0100.00817.40
8.0.10.0040.00416.83
8.0.00.0090.00916.78
7.4.330.0060.00015.08
7.4.320.0030.00316.46
7.4.300.0050.00216.49
7.4.290.0030.00316.44
7.4.280.0040.00416.50
7.4.270.0000.00716.47
7.4.260.0040.00416.44
7.4.250.0050.00216.30
7.4.240.0070.00016.39
7.4.230.0030.00316.43
7.4.220.0030.01816.52
7.4.210.0080.00616.46
7.4.200.0000.00716.20
7.4.160.0090.00616.28
7.4.150.0230.00617.40
7.4.140.0100.01017.86
7.4.130.0070.01016.52
7.4.120.0100.00616.26
7.4.110.0100.00716.53
7.4.100.0070.01016.48
7.4.90.0000.01816.45
7.4.80.0100.00719.39
7.4.70.0110.00716.47
7.4.60.0080.00816.34
7.4.50.0080.00016.50
7.4.40.0130.00716.48
7.4.30.0070.01316.73
7.4.00.0000.01414.82
7.3.330.0030.00313.24
7.3.320.0000.00513.07
7.3.310.0030.00316.10
7.3.300.0070.00016.22
7.3.290.0000.00716.28
7.3.280.0080.01016.25
7.3.270.0070.01117.40
7.3.260.0070.01016.31
7.3.250.0070.00916.31
7.3.240.0130.00416.30
7.3.230.0100.00716.47
7.3.210.0100.01316.36
7.3.200.0080.00816.29
7.3.190.0060.01016.36
7.3.180.0090.00616.18
7.3.170.0110.00516.35
7.3.160.0070.01116.34
7.2.330.0170.00716.54
7.2.320.0130.01016.42
7.2.310.0080.00816.40
7.2.300.0130.00316.61
7.2.290.0130.01016.24
7.2.60.0070.00716.55
7.2.00.0060.00619.52
7.1.200.0000.01515.55
7.1.100.0090.00618.02
7.1.70.0040.00417.01
7.1.60.0100.01420.03
7.1.50.0130.00316.80
7.1.00.0000.08022.54
7.0.200.0170.00914.44
7.0.60.0100.08319.78
7.0.50.0000.05717.79
7.0.40.0070.04719.96
7.0.30.0130.04720.11
7.0.20.0270.07720.16
7.0.10.0070.05020.09
7.0.00.0130.06320.22
5.6.280.0030.07320.93
5.6.210.0070.08320.75
5.6.200.0200.07318.14
5.6.190.0070.08320.67
5.6.180.0130.08320.61
5.6.170.0230.04020.62
5.6.160.0100.04720.63
5.6.150.0030.04718.18
5.6.140.0000.08318.14
5.6.130.0100.07018.18
5.6.120.0070.06321.13
5.6.110.0070.06721.01
5.6.100.0000.04321.14
5.6.90.0130.08020.99
5.6.80.0100.07020.39
5.6.70.4700.03320.41
5.5.350.0300.07020.42
5.5.340.0030.08017.95
5.5.330.0000.05020.21
5.5.320.0230.04020.42
5.5.310.0300.07320.28
5.5.300.0100.07717.98
5.5.290.0030.04018.05
5.5.280.0030.04020.88
5.5.270.0070.08320.77
5.5.260.0100.05720.78
5.5.250.0130.06020.69
5.5.240.0130.04020.24
5.4.450.0330.06019.62
5.4.440.0500.04719.47
5.4.430.0370.05719.54
5.4.420.0300.07019.60
5.4.410.0370.05319.50
5.4.400.0570.04019.22
5.4.390.0100.05318.84
5.4.380.0030.05718.84
5.4.370.0430.04719.30
5.4.360.0370.05319.01
5.4.350.0330.05319.08
5.4.340.0370.05319.29
5.4.320.0430.05019.01
5.4.310.0300.05719.23
5.4.300.0300.06018.97
5.4.290.0430.05719.11
5.4.280.0470.04318.97
5.4.270.0470.04019.22
5.4.260.0330.06019.14
5.4.250.0370.05319.22
5.4.240.0300.05718.83
5.4.230.0400.04719.16
5.4.220.0370.05019.00
5.4.210.0400.04718.83
5.4.200.0300.05719.27
5.4.190.0330.05319.25
5.4.180.0400.04719.14
5.4.170.0270.04319.29
5.4.160.0170.05019.35
5.4.150.0170.05719.04
5.4.140.0200.04716.56
5.4.130.0270.03716.60
5.4.120.0070.06016.36
5.4.110.0170.05016.32
5.4.100.0200.05016.66
5.4.90.0100.06316.53
5.4.80.0270.04316.64
5.4.70.0030.07016.57
5.4.60.0170.07316.53
5.4.50.0100.06316.25
5.4.40.0200.05016.51
5.4.30.0200.03716.52
5.4.20.0230.06716.25

preferences:
45.9 ms | 401 KiB | 5 Q