3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(){ try { throw new Exception('Foo'); } finally { throw new Exception('Bar', 0, new Exception("I don't even.")); } } try { foo(); } catch(Exception $exception) { $actualPrevious = $exception->getPrevious(); var_dump($actualPrevious); }

preferences:
44.57 ms | 402 KiB | 5 Q