summaryrefslogtreecommitdiff
path: root/ext/standard/tests/general_functions/bug25038.phpt
blob: 52fe0320564f3549a757ee7b632b8405d99feee0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--TEST--
Bug #25038 (call_user_func issues warning if function throws exception)
--FILE--
<?php

function bar($x='no argument')
{
    throw new Exception("This is an exception from bar({$x}).");
}
try
{
	bar('first try');
}
catch (Exception $e)
{
	print $e->getMessage()."\n";
}
try
{
	call_user_func('bar','second try');
}
catch (Exception $e)
{
	print $e->getMessage()."\n";
}

?>
===DONE===
--EXPECT--
This is an exception from bar(first try).
This is an exception from bar(second try).
===DONE===