<?php function test() { try { throw new \RuntimeException('Test error'); } catch (\RuntimeException $e) { $error = $e; $errorClass = get_class($e); throw new $errorClass($e->getMessage()); } finally { var_dump($error->getMessage()); } } echo test();
You have javascript disabled. You will not be able to edit any code.