3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types=1); function a(): void { $_ = [1, 2, throw new Exception('a')]; echo 'unreachable!'; } function b(): void { $_ = strlen(throw new Exception('b')); echo 'unreachable!'; } function c(): void { $_ = 1 + 2 + throw new Exception('c'); echo 'unreachable!'; } try { try { try { a(); } catch (Exception) { b(); } } catch (Exception) { c(); } } catch (Exception) { echo 'done'; }

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.5.90.0120.00517.10
8.5.80.0080.01116.80
8.5.70.0100.00718.66
8.5.60.0100.00716.89
8.5.50.0100.00716.82
8.5.30.0090.00819.55
8.5.20.0090.00817.37
8.5.10.0080.01018.50
8.4.240.0140.00819.55
8.4.230.0080.00119.66
8.4.220.0140.00719.59
8.4.210.0060.01321.49
8.4.180.0110.00719.62
8.4.170.0130.00822.30
8.4.160.0100.01122.35
8.4.90.0130.00819.78
8.3.330.0120.00918.50
8.3.320.0050.00318.57
8.3.310.0060.00918.45
8.3.300.0050.00520.07
8.3.290.0110.00920.13
8.3.180.0110.00718.51
8.3.50.0120.00718.60
8.2.320.0120.00918.18
8.2.310.0120.00718.25

preferences:
43.95 ms | 585 KiB | 5 Q