3v4l.org

run code in 300+ 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.20.0090.00817.37
8.5.10.0080.01018.50
8.4.170.0130.00822.30
8.4.160.0100.01122.35
8.4.90.0130.00819.78
8.3.300.0050.00520.07
8.3.290.0110.00920.13
8.3.180.0110.00718.51
8.3.50.0120.00718.60

preferences:
29.71 ms | 403 KiB | 5 Q