3v4l.org

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

preferences:
39.25 ms | 402 KiB | 5 Q