3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Foo { public function doSomething(string $param1); } class Bar implements Foo { public function doSomething(string $param1) { echo "Bar: " . $param1; } } class Baz implements Foo { // Using a named parameter different from Foo's signature public function doSomething(string $paramName) { echo "Baz: " . $paramName; } } function processFoo(Foo $foo) { $foo->doSomething(param1: "Test"); } $bar = new Bar(); $baz = new Baz(); processFoo($bar); // Works fine processFoo($baz); // Fatal error:

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.4.10.0040.00419.52
8.3.140.0040.01116.98
8.3.130.0040.01118.42
8.3.120.0100.00620.58
8.3.110.0090.00018.63
8.3.100.0000.01216.92
8.3.90.0100.01026.77
8.3.80.0140.00519.33
8.3.70.0220.00520.24
8.3.60.0200.00420.11
8.3.50.0060.00520.37
8.3.40.0170.00520.34
8.3.30.0180.00520.73
8.3.20.0190.00620.56
8.3.10.0150.00620.58
8.3.00.0210.00320.48
8.2.260.0000.00818.36
8.2.250.0040.00416.57
8.2.240.0070.00717.02
8.2.230.0040.00420.94
8.2.220.0120.00324.06
8.2.210.0040.01126.77
8.2.200.0090.00520.32
8.2.190.0180.00519.99
8.2.180.0170.00519.95
8.2.170.0190.00620.58
8.2.160.0200.00520.58
8.2.150.0200.00420.61
8.2.140.0220.00320.47
8.2.130.0190.00520.54
8.2.120.0200.00520.48
8.2.110.0220.00320.44
8.2.100.0180.00620.48
8.2.90.0200.00420.51
8.2.80.0190.00520.47
8.2.70.0170.00620.42
8.2.60.0170.00620.45
8.2.50.0190.00520.58
8.2.40.0180.00520.57
8.2.30.0170.00620.57
8.2.20.0180.00520.44
8.2.10.0180.00520.41
8.2.00.0190.00420.43
8.1.310.0060.01018.33
8.1.300.0120.00616.47
8.1.290.0160.00519.73
8.1.280.0180.00419.76
8.1.270.0190.00620.45
8.1.260.0190.00620.40
8.1.250.0200.00520.43
8.1.240.0190.00420.45
8.1.230.0160.00620.33
8.1.220.0180.00520.32
8.1.210.0180.00520.29
8.1.200.0160.00620.34
8.1.190.0160.00520.36
8.1.180.0180.00420.26
8.1.170.0160.00520.26
8.1.160.0160.00520.29
8.1.150.0180.00420.52
8.1.140.0170.00420.30
8.1.130.0140.00820.27
8.1.120.0160.00520.40
8.1.110.0170.00520.32
8.1.100.0170.00420.31
8.1.90.0170.00520.36
8.1.80.0180.00420.42
8.1.70.0170.00420.31
8.1.60.0180.00620.40
8.1.50.0200.00420.38
8.1.40.0180.00520.52
8.1.30.0190.00520.55
8.1.20.0190.00520.40
8.1.10.0180.00620.39
8.1.00.0190.00420.32

preferences:
26.74 ms | 403 KiB | 5 Q