1--TEST-- 2Try catch finally (re-throw exception in catch block) 3--FILE-- 4<?php 5function foo ($a) { 6 try { 7 throw new Exception("ex"); 8 } catch (Exception $e) { 9 var_dump($a); 10 throw $e; 11 } finally { 12 var_dump("finally"); 13 return "return"; 14 } 15 return 1; 16} 17 18try { 19 var_dump(foo("para")); 20} catch (Exception $e) { 21 "caught exception" . PHP_EOL; 22 var_dump($e->getMessage()); 23} 24?> 25--EXPECT-- 26string(4) "para" 27string(7) "finally" 28string(6) "return" 29