3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface A { public function foo(string $s): string; public function bar(int $i): int; } // Абстрактный класс может реализовывать только часть интерфейса. // Классы, расширяющие абстрактный класс, должны реализовать все остальные. abstract class B implements A { public function foo(string $s): string { return $s . PHP_EOL; } } class C extends B { public function bar(int $i): int { return $i * 2; } } $c = new C(); echo $c->bar(2); // OK, 4 $b = new B(); $b->foo("123");

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.1.20.0040.00417.66
8.1.10.0000.00817.49
8.1.00.0050.00217.39
8.0.150.0000.00716.89
8.0.140.0000.00716.77
8.0.130.0030.00313.33
8.0.120.0080.00016.84
8.0.110.0000.00816.89
8.0.100.0050.00316.89
8.0.90.0000.00716.99
8.0.80.0060.01016.92
8.0.70.0030.01216.95
8.0.60.0090.00616.84
8.0.50.0150.00016.77
8.0.30.0090.00616.95
8.0.20.0110.01116.99
8.0.10.0070.01417.04
8.0.00.0070.00717.11
7.4.270.0000.00716.49
7.4.260.0050.00013.20
7.4.250.0030.00316.54
7.4.240.0000.00716.42
7.4.230.0000.00716.66
7.4.220.0030.00316.70
7.4.210.0100.00316.54
7.4.200.0030.01116.59
7.4.190.0030.01016.50
7.4.180.0100.01016.51
7.4.160.0040.01116.48
7.4.150.0130.00716.63
7.4.140.0080.00616.40
7.4.130.0110.00316.42
7.4.120.0080.00516.37
7.4.110.0070.01316.54
7.4.100.0090.00916.56
7.4.90.0060.01316.54
7.4.80.0120.00316.43
7.4.70.0070.00716.59
7.4.60.0030.01016.48
7.4.50.0100.00316.41
7.4.40.0030.01016.50
7.4.30.0100.00316.55
7.4.20.0060.00916.34
7.4.10.0060.00916.55
7.4.00.0110.00316.59
7.3.330.0030.00716.18
7.3.320.0030.00313.29
7.3.310.0040.00416.27
7.3.300.0050.00216.17
7.3.290.0100.00416.35
7.3.280.0110.00416.28
7.3.270.0120.00316.28
7.3.260.0040.01116.38
7.3.250.0110.00716.32
7.3.240.0040.01116.38
7.3.230.0070.00716.28
7.3.220.0080.00616.39
7.3.210.0030.01016.35
7.3.200.0070.00716.35
7.3.190.0030.01016.39
7.3.180.0070.00716.38
7.3.170.0100.00316.37
7.3.160.0030.01116.38
7.3.150.0100.00316.38
7.3.140.0100.00316.37
7.3.130.0070.00716.36
7.3.120.0030.01016.34
7.3.110.0080.00516.25
7.3.100.0040.01116.25
7.3.90.0030.01016.49
7.3.80.0070.00716.29
7.3.70.0030.00916.35
7.3.60.0060.00616.42
7.3.50.0100.00316.43
7.3.40.0030.01016.41
7.3.30.0080.00416.45
7.3.20.0130.00716.56
7.3.10.0100.01016.40
7.3.00.0080.01216.33

preferences:
13.77 ms | 455 KiB | 5 Q