3v4l.org

run code in 300+ PHP versions simultaneously
<?php $f = function (): string { try { throw new \Exception('foo'); } finally { throw new \Exception('bar'); } }; try { var_dump($f()); } catch (\Throwable $e) { var_dump($e->getMessage()); var_dump($e->getPrevious()->getMessage()); }

preferences:
43.06 ms | 1372 KiB | 5 Q