~ubuntu-branches/ubuntu/hardy/php5/hardy-updates

« back to all changes in this revision

Viewing changes to ext/standard/tests/general_functions/bug25038.phpt

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-10-09 03:14:32 UTC
  • Revision ID: james.westby@ubuntu.com-20051009031432-kspik3lobxstafv9
Tags: upstream-5.0.5
ImportĀ upstreamĀ versionĀ 5.0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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===