3v4l.org

run code in 300+ PHP versions simultaneously
<?php function functionCall4() { if (true or mt_rand(1, 4) === 2) { throw new \Exception('exception'); } } function functionCall3() { functionCall4(); } function functionCall2() { functionCall3(); } function functionCall1() { try { functionCall2(); } catch (\Exception $e) { throw new \RuntimeException($e->getMessage(), $e->getCode(), $e); } } try { functionCall1(); } catch (\RuntimeException $e) { echo 'Exception caught', PHP_EOL; while ($e) { echo 'Trace for ', get_class($e), "\n"; print_r($e->getTrace()); $e = $e->getPrevious(); } }

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.00720.71
8.4.110.0130.00718.86
8.4.100.0100.00417.77
8.4.90.0140.00718.80
8.4.80.0050.00417.80
8.4.70.0120.00917.91
8.4.60.0120.00818.75
8.4.50.0100.01019.45
8.4.40.0130.00623.96
8.4.30.0130.00318.88
8.4.20.0090.00017.96
8.4.10.0000.00923.97
8.3.250.0120.00820.82
8.3.240.0050.00416.48
8.3.230.0120.00616.89
8.3.220.0120.00717.38
8.3.210.0120.01016.57
8.3.200.0070.00116.89
8.3.190.0120.00617.27
8.3.180.0080.01016.61
8.3.170.0130.00618.80
8.3.160.0090.00918.30
8.3.150.0070.01118.87
8.3.140.0040.01420.49
8.3.130.0060.00318.52
8.3.120.0130.00620.73
8.3.110.0050.01018.16
8.3.100.0090.00616.60
8.3.90.0040.00426.77
8.3.80.0090.00018.55
8.3.70.0070.00716.63
8.3.60.0180.00018.68
8.3.50.0100.01016.63
8.3.40.0130.00623.73
8.3.30.0090.00618.70
8.3.20.0040.00424.18
8.3.10.0050.00324.66
8.3.00.0040.00426.16
8.2.290.0100.00820.36
8.2.280.0080.00418.40
8.2.270.0120.00616.89
8.2.260.0120.00620.56
8.2.250.0110.00716.61
8.2.240.0140.00318.92
8.2.230.0000.00820.94
8.2.220.0040.00416.63
8.2.210.0040.00426.77
8.2.200.0030.00616.63
8.2.190.0140.00716.58
8.2.180.0120.00316.50
8.2.170.0070.01418.91
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0150.00324.66
8.2.130.0090.00026.16
8.2.120.0040.00419.77
8.2.110.0090.00020.41
8.2.100.0050.00522.08
8.2.30.0060.00317.63
8.1.330.0050.00322.22
8.1.320.0110.00816.05
8.1.310.0000.00816.97
8.1.300.0070.01318.35
8.1.290.0080.00430.84
8.1.280.0080.01125.92
8.1.270.0000.00824.66
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00318.86
8.1.230.0070.00318.44

preferences:
25.08 ms | 403 KiB | 5 Q