3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Runnable { public function run(string $details): void; } class Impl1 implements Runnable { public function run(string $details): void { } } class Impl2 implements Runnable { public function run(string $other): void { } } function getImpl():Runnable{ static $i=0; if($i===1){ return new Impl2(); } ++$i; return new Impl1(); } getImpl()->run(details:"foo"); getImpl()->run(details:"foo");

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.120.0070.00420.77
8.4.110.0030.00522.35
8.4.100.0070.00320.68
8.4.90.0120.01018.53
8.4.80.0040.00622.59
8.4.70.0110.00918.26
8.4.60.0090.01118.71
8.4.50.0040.00418.47
8.4.40.0040.01517.95
8.4.30.0090.01020.58
8.4.20.0040.00419.46
8.4.10.0050.00322.68
8.3.250.0100.00919.01
8.3.240.0080.01116.61
8.3.230.0130.00616.92
8.3.220.0080.00517.41
8.3.210.0090.00618.66
8.3.200.0100.00716.65
8.3.190.0130.00617.06
8.3.180.0110.00517.18
8.3.170.0100.00720.77
8.3.160.0110.00718.56
8.3.150.0140.00417.09
8.3.140.0140.00016.72
8.3.130.0060.00318.79
8.3.120.0060.00319.00
8.3.110.0090.00016.68
8.3.100.0080.00316.92
8.3.90.0110.00726.77
8.3.80.0060.00316.63
8.3.70.0070.01018.36
8.3.60.0140.01118.56
8.3.50.0140.00523.71
8.3.40.0100.01018.96
8.3.30.0120.00318.84
8.3.20.0040.00424.18
8.3.10.0060.00324.66
8.3.00.0080.00026.16
8.2.290.0070.00320.27
8.2.280.0100.00918.71
8.2.270.0070.01116.99
8.2.260.0150.00016.78
8.2.250.0150.00318.42
8.2.240.0070.00316.64
8.2.230.0090.00020.94
8.2.220.0040.00424.06
8.2.210.0030.01026.77
8.2.200.0030.00616.50
8.2.190.0070.00716.75
8.2.180.0160.00325.92
8.2.170.0110.00419.11
8.2.160.0070.00722.96
8.2.150.0000.00725.66
8.2.140.0050.00224.66
8.2.130.0040.00426.16
8.2.120.0000.00926.35
8.2.110.0080.00320.46
8.2.100.0090.00018.97
8.1.330.0110.00722.08
8.1.320.0050.00516.42
8.1.310.0070.00416.30
8.1.300.0030.01618.01
8.1.290.0060.00330.84
8.1.280.0150.00325.92
8.1.270.0060.00323.99
8.1.260.0000.00826.35
8.1.250.0000.00728.09
8.1.240.0070.00318.87
8.1.230.0100.00018.75
8.0.30.0120.00816.93
8.0.20.0070.01317.09
8.0.10.0030.01717.13
8.0.00.0130.01017.10
7.4.160.0040.01216.39
7.4.150.0090.00916.34
7.4.140.0000.01416.35
7.4.130.0110.01116.20
7.4.120.0070.01416.16
7.4.110.0120.00316.35
7.4.100.0070.00716.52
7.4.90.0090.01016.24
7.4.80.0090.01016.35
7.4.70.0140.00516.22
7.4.60.0150.00616.35
7.4.50.0120.00816.34
7.4.40.0170.00616.23
7.4.30.0130.00816.40
7.4.20.0130.00716.22
7.4.10.0150.00616.26
7.4.00.0100.01016.23
7.3.280.0070.00716.10
7.3.270.0030.01016.07
7.3.260.0130.00916.20
7.3.250.0170.00316.21
7.3.240.0070.00716.13
7.3.230.0080.00816.22
7.3.220.0060.00616.05
7.3.210.0150.00316.15
7.3.200.0140.00416.23
7.3.190.0160.00616.21
7.3.180.0130.00516.12
7.3.170.0170.00316.21
7.3.160.0150.00616.21
7.3.150.0130.00716.15
7.3.140.0150.00716.23
7.3.130.0110.00916.18
7.3.120.0120.00716.15
7.3.110.0140.00716.22
7.3.100.0150.00716.16
7.3.90.0150.00816.27
7.3.80.0140.00716.14
7.3.70.0170.00616.07
7.3.60.0110.00916.21
7.3.50.0170.00616.24
7.3.40.0150.00716.18
7.3.30.0140.00716.22
7.3.20.0120.00916.84
7.3.10.0120.01016.81
7.3.00.0170.00616.74
7.2.340.0130.01016.07
7.2.330.0130.00916.13
7.2.320.0170.00916.29
7.2.310.0170.00516.27
7.2.300.0160.00816.07
7.2.290.0160.00716.25
7.2.280.0160.00916.36
7.2.270.0120.01316.32
7.2.260.0180.00716.30
7.2.250.0160.00716.32
7.2.240.0140.01016.26
7.2.230.0140.01416.21
7.2.220.0210.00416.26
7.2.210.0160.00716.26
7.2.200.0190.00916.32
7.2.190.0190.00516.29
7.2.180.0170.00816.28
7.2.170.0160.01216.21
7.2.160.0220.00316.34
7.2.150.0170.00716.91
7.2.140.0170.00716.95
7.2.130.0160.01117.12
7.2.120.0190.01017.08
7.2.110.0210.00816.95
7.2.100.0190.00816.94
7.2.90.0220.01016.94
7.2.80.0280.01117.02
7.2.70.0230.01316.92
7.2.60.0250.01116.81
7.2.50.0210.01016.91
7.2.40.0180.00917.09
7.2.30.0220.01317.02
7.2.20.0170.00817.07
7.2.10.0150.01016.83
7.2.00.0200.01016.97

preferences:
27.93 ms | 403 KiB | 5 Q