3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Baz { public function foo(string $param = null, int $bar); } class Foo { public function foo(string $param = null, int $bar) { var_dump($param, $bar); } } class Bar extends Foo implements Baz { public function foo(?string $param, int $bar) { parent::foo($param, $bar); } } (new Bar)->foo('a', 1); interface Qux { public function foo(?string $param, int $bar); } class Quux { public function foo(?string $param, int $bar) { var_dump($param, $bar); } } class Corge extends Quux implements Qux { public function foo(string $param = null, int $bar) { parent::foo($param, $bar); } } (new Corge)->foo('b', 2);

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.130.0120.00917.65
8.4.120.0100.00522.33
8.4.110.0030.00618.92
8.4.100.0090.01117.82
8.4.90.0130.00717.58
8.4.80.0040.00417.77
8.4.70.0130.00717.66
8.4.60.0100.01017.82
8.4.50.0100.00918.41
8.4.40.0100.01017.86
8.4.30.0110.00418.73
8.4.20.0110.01117.75
8.4.10.0060.00319.56
8.3.260.0100.01016.59
8.3.250.0100.00918.97
8.3.240.0050.00518.37
8.3.230.0110.00816.77
8.3.220.0130.00617.32
8.3.210.0090.00816.83
8.3.200.0100.00916.53
8.3.190.0090.01016.57
8.3.180.0030.00518.43
8.3.170.0130.00618.75
8.3.160.0030.01518.48
8.3.150.0130.00720.59
8.3.140.0080.00020.62
8.3.130.0080.00018.64
8.3.120.0070.00420.60
8.3.110.0000.01020.94
8.3.100.0030.00624.06
8.3.90.0030.00526.77
8.3.80.0040.00418.18
8.3.70.0110.00418.30
8.3.60.0070.01118.43
8.3.50.0090.00616.44
8.3.40.0110.00421.70
8.3.30.0110.00418.90
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0070.00026.16
8.2.290.0030.00620.29
8.2.280.0050.00518.42
8.2.270.0060.01317.18
8.2.260.0060.00316.54
8.2.250.0090.00916.74
8.2.240.0000.00917.44
8.2.230.0000.00822.58
8.2.220.0000.00837.54
8.2.210.0030.00626.77
8.2.200.0090.00018.29
8.2.190.0090.00918.16
8.2.180.0070.01116.63
8.2.170.0040.01218.83
8.2.160.0140.00722.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0030.00620.90
8.2.110.0060.00320.54
8.2.100.0180.01417.36
8.2.90.0310.00017.50
8.2.80.0260.00417.38
8.2.70.0280.00317.13
8.2.60.0290.00317.13
8.2.50.0250.00517.38
8.2.40.0360.00017.25
8.2.30.0210.00717.12
8.2.20.0220.00617.25
8.2.10.0190.01017.25
8.2.00.0260.00317.00
8.1.330.0130.00616.49
8.1.320.0090.01116.34
8.1.310.0000.00918.25
8.1.300.0000.00917.93
8.1.290.0040.00430.84
8.1.280.0110.01425.92
8.1.270.0080.00024.66
8.1.260.0000.00926.35
8.1.250.0040.00428.09
8.1.240.0060.00322.20
8.1.230.0230.00717.00
8.1.220.0240.00416.88
8.1.210.0250.00517.25
8.1.200.0260.00416.98
8.1.190.0300.00016.72
8.1.180.0210.00916.88
8.1.170.0210.00717.38
8.1.160.0240.00417.00
8.1.150.0260.00317.00
8.1.140.0240.00416.88
8.1.130.0210.00317.12
8.1.120.0210.00717.23
8.1.110.0260.00317.25
8.1.100.0290.00017.13
8.1.90.0190.00817.13
8.1.80.0220.00717.25
8.1.70.0200.00817.10
8.1.60.0270.00316.97
8.1.50.0250.00017.00
8.1.40.0240.00317.47
8.1.30.0270.00317.25
8.1.20.0170.00617.25
8.1.10.0130.00417.13
8.1.00.0120.00517.11
8.0.300.0150.00316.72
8.0.290.0070.01116.38
8.0.280.0050.01016.63
8.0.270.0170.00016.50
8.0.260.0130.00516.75
8.0.250.0140.00316.63
8.0.240.0160.00416.63
8.0.230.0100.00716.75
8.0.220.0160.00216.50
8.0.210.0190.00016.38
8.0.200.0100.00716.50
8.0.190.0110.00216.75
8.0.180.0130.00016.63
8.0.170.0090.00316.75
8.0.160.0080.00416.88
8.0.150.0050.01016.36
8.0.140.0080.00416.75
8.0.130.0130.00316.63
8.0.120.0080.00416.63
8.0.110.0060.00616.75
8.0.100.0000.01116.47
8.0.90.0090.00316.63
8.0.80.0090.00316.63
8.0.70.0160.01016.38
8.0.60.0110.00616.47
8.0.50.0030.00916.60
8.0.30.0090.00216.63
8.0.20.0110.00316.48
8.0.10.0040.00816.50

preferences:
27.63 ms | 403 KiB | 5 Q