<?php define('DO_RETURN', false); function execute() { try { throw new \Exception('root exception'); // throws exception } catch (\Throwable $e) { echo "[catch]"; // exception is handled somehow throw $e; // and rethrown return; // never called } finally { echo "[finally]"; // finally is handed if (DO_RETURN) return; // if return is here the thrown exception is ignored and silently scratched } } execute(); // the exception was rethrown, so should be thrown after finally
You have javascript disabled. You will not be able to edit any code.