3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(){ try { throw new Exception('Foo'); } finally { $a = new Exception("Test"); var_dump($a->getPrevious()); $b = new Exception("Test2"); throw new Exception("test3"); } } try { foo(); } catch(Exception $exception) { // $actualPrevious = $exception->getPrevious(); //var_dump($actualPrevious); }

preferences:
62.54 ms | 402 KiB | 5 Q