3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface I { public function example($a, $b, $c); } class A implements I { public function example($a, $b = null, $c = null) { } // compatible with I::example } class B extends A { public function example($a, $b, $c = null) { } // compatible with I::example } function accepts_i(I $i) { $i->example(1, 2, 3); } accepts_i(new B); // no problem function accepts_a(A $a) { $a->example(1); } accepts_a(new B); // problem

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.0120.00618.60
8.3.30.0120.00318.73
8.3.20.0040.00423.66
8.3.10.0100.00323.53
8.3.00.0030.00519.26
8.2.170.0120.00322.96
8.2.160.0070.00720.39
8.2.150.0000.00724.18
8.2.140.0040.00424.66
8.2.130.0040.00417.97
8.2.120.0000.00826.35
8.2.110.0060.01520.38
8.2.100.0090.00317.66
8.2.90.0040.00419.95
8.2.80.0040.00417.97
8.2.70.0060.00318.04
8.2.60.0040.00418.03
8.2.50.0000.00818.10
8.2.40.0040.00422.25
8.2.30.0040.00419.26
8.2.20.0000.00817.99
8.2.10.0040.00418.04
8.2.00.0030.00617.65
8.1.270.0000.00820.20
8.1.260.0000.00826.35
8.1.250.0060.00328.09
8.1.240.0060.00320.88
8.1.230.0040.00719.01
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0040.00417.23
8.1.190.0000.00917.10
8.1.180.0050.00218.10
8.1.170.0060.00318.91
8.1.160.0030.00518.77
8.1.150.0040.00420.25
8.1.140.0080.00019.51
8.1.130.0030.00317.42
8.1.120.0000.00817.44
8.1.110.0000.00817.36
8.1.100.0030.00317.29
8.1.90.0030.00317.41
8.1.80.0000.00717.39
8.1.70.0030.00317.41
8.1.60.0080.00017.55
8.1.50.0030.00617.47
8.1.40.0060.00317.40
8.1.30.0050.00317.65
8.1.20.0040.00417.61
8.1.10.0000.00717.34
8.1.00.0050.00217.33
8.0.300.0040.00419.65
8.0.290.0070.00016.75
8.0.280.0040.00418.41
8.0.270.0000.00718.00
8.0.260.0020.00516.82
8.0.250.0030.00316.98
8.0.240.0070.00017.02
8.0.230.0060.00316.85
8.0.220.0030.00316.93
8.0.210.0040.00416.85
8.0.200.0070.00016.99
8.0.190.0070.00016.91
8.0.180.0000.00716.81
8.0.170.0000.00716.99
8.0.160.0000.00716.78
8.0.150.0030.00616.80
8.0.140.0070.00016.89
8.0.130.0000.00713.30
8.0.120.0070.00016.73
8.0.110.0030.00316.98
8.0.100.0080.00016.80
8.0.90.0070.00016.92
8.0.80.0140.00416.78
8.0.70.0040.00416.80
8.0.60.0040.00416.88
8.0.50.0070.00016.80
8.0.30.0140.00516.95
8.0.20.0050.01317.40
8.0.10.0040.00416.98
8.0.00.0030.01316.80
7.4.330.0000.00515.55
7.4.320.0030.00316.37
7.4.300.0060.00016.39
7.4.290.0000.00716.47
7.4.280.0050.00316.45
7.4.270.0030.00316.45
7.4.260.0030.00516.41
7.4.250.0030.00316.49
7.4.240.0040.00416.44
7.4.230.0000.00716.63
7.4.220.0130.00316.39
7.4.210.0130.00716.57
7.4.200.0060.00316.32
7.4.160.0050.01116.61
7.4.150.0120.00917.40
7.4.140.0100.01017.86
7.4.130.0070.00916.37
7.4.120.0060.01216.44
7.4.110.0030.01316.44
7.4.100.0090.00916.43
7.4.90.0070.01316.53
7.4.80.0060.01219.39
7.4.70.0140.00316.34
7.4.60.0030.01316.53
7.4.50.0060.00916.28
7.4.40.0100.00716.54
7.4.30.0060.01216.41
7.4.00.0050.00814.97
7.3.330.0030.00313.38
7.3.320.0000.00513.32
7.3.310.0070.00016.11
7.3.300.0070.00016.26
7.3.290.0070.00816.27
7.3.280.0070.01116.32
7.3.270.0100.01017.40
7.3.260.0080.01216.50
7.3.250.0070.00916.33
7.3.240.0130.00616.38
7.3.230.0100.00716.42
7.3.210.0110.00916.30
7.3.200.0150.01016.37
7.3.190.0100.00716.53
7.3.180.0060.01116.23
7.3.170.0140.00316.34
7.3.160.0040.01216.22
7.2.330.0100.00716.42
7.2.320.0090.00916.47
7.2.310.0120.00616.61
7.2.300.0180.00016.55
7.2.290.0060.01316.25
7.2.60.0070.00716.74
7.2.00.0030.00919.13
7.1.200.0030.00815.71
7.1.100.0070.00717.75
7.1.70.0030.01217.01
7.1.60.0060.00617.11
7.1.50.0070.01716.89
7.1.10.0100.05722.07
7.1.00.0070.06022.38
7.0.200.0030.01016.75
7.0.150.0070.06021.83
7.0.140.0100.05321.81
7.0.130.0100.05721.86
7.0.120.0070.06021.91
7.0.110.0130.06021.93
7.0.100.0070.05721.92
7.0.90.0100.05321.96
7.0.80.0030.06021.82
7.0.70.0130.05321.96
7.0.60.0130.05021.85
7.0.50.0030.06021.86
7.0.40.0130.05321.85
7.0.30.0100.07721.88
7.0.20.0070.05721.95
7.0.10.0100.05321.98
7.0.00.0130.07021.92

preferences:
36.93 ms | 400 KiB | 5 Q