3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class DemoFile { public function run(array $data): void { try { foreach ($data as $key => $val) { throw new \Exception('test'); } } catch (\Throwable) { echo 'Failed at value '.$val; } } } $d = new DemoFile(); $d->run(['test']);

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.0130.00622.64
8.4.110.0110.00822.28
8.4.100.0070.00217.98
8.4.90.0090.01117.98
8.4.80.0140.00319.70
8.4.70.0160.00917.90
8.4.60.0140.00617.70
8.4.50.0050.00418.68
8.4.40.0100.01017.99
8.4.30.0130.00718.49
8.4.20.0130.01019.43
8.4.10.0270.00417.32
8.3.250.0110.00818.78
8.3.240.0110.00816.36
8.3.230.0130.00816.73
8.3.220.0110.00717.32
8.3.210.0130.00716.77
8.3.200.0150.00616.62
8.3.190.0130.00616.86
8.3.180.0070.00816.64
8.3.170.0070.01117.13
8.3.160.0000.00816.69
8.3.150.0180.00316.59
8.3.140.0150.00616.64
8.3.130.0120.00618.31
8.3.120.0160.00316.29
8.3.110.0200.00016.60
8.3.100.0200.00318.53
8.3.90.0200.00016.68
8.3.80.0200.00016.75
8.3.70.0200.00016.15
8.3.60.0120.00816.26
8.3.50.0220.00016.56
8.3.40.0080.00817.50
8.3.30.0150.00417.29
8.3.20.0090.00919.16
8.3.10.0150.00017.54
8.3.00.0040.00717.31
8.2.290.0130.00520.38
8.2.280.0090.00818.32
8.2.270.0160.00416.50
8.2.260.0140.00518.35
8.2.250.0140.00316.96
8.2.240.0150.00418.25
8.2.230.0150.00416.75
8.2.220.0150.00316.76
8.2.210.0140.00616.22
8.2.200.0180.00416.61
8.2.190.0080.01218.30
8.2.180.0160.00016.29
8.2.170.0120.00817.66
8.2.160.0130.00517.60
8.2.150.0150.00417.19
8.2.140.0170.00417.29
8.2.130.0140.00417.26
8.2.120.0140.00517.34
8.2.110.0170.00019.21
8.2.100.0140.00317.56
8.2.90.0130.00417.48
8.2.80.0120.00617.66
8.2.70.0170.00018.99
8.2.60.0160.00017.48
8.2.50.0120.00717.29
8.2.40.0100.00717.67
8.2.30.0110.00517.20
8.2.20.0130.00517.39
8.2.10.0150.00017.59
8.2.00.0130.00017.32
8.1.320.0110.00820.14

preferences:
27.04 ms | 403 KiB | 5 Q