Return to bug25038.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / general_functions |
1.1 misho 1: --TEST-- 2: Bug #25038 (call_user_func issues warning if function throws exception) 3: --FILE-- 4: <?php 5: 6: function bar($x='no argument') 7: { 8: throw new Exception("This is an exception from bar({$x})."); 9: } 10: try 11: { 12: bar('first try'); 13: } 14: catch (Exception $e) 15: { 16: print $e->getMessage()."\n"; 17: } 18: try 19: { 20: call_user_func('bar','second try'); 21: } 22: catch (Exception $e) 23: { 24: print $e->getMessage()."\n"; 25: } 26: 27: ?> 28: ===DONE=== 29: --EXPECT-- 30: This is an exception from bar(first try). 31: This is an exception from bar(second try). 32: ===DONE===