1--TEST-- 2Try finally (re-throw exception in finally block) 3--FILE-- 4<?php 5function foo () { 6 try { 7 throw new Exception("try"); 8 } finally { 9 throw new Exception("finally"); 10 } 11} 12 13try { 14 foo(); 15} catch (Exception $e) { 16 do { 17 var_dump($e->getMessage()); 18 } while ($e = $e->getPrevious()); 19} 20?> 21--EXPECT-- 22string(7) "finally" 23string(3) "try" 24