PHP  
 PHP_5_5
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Expected Test Failure Report for Zend/tests/bug65784.phpt ('Fixed Bug #65784 (Segfault with finally)')

Script

1: <?php
2:
function foo1() {
3:     try {
4:         throw new 
Exception("not catch");
5:         return 
true;
6:     } 
finally {
7:         try {
8:             throw new 
Exception("catched");
9:         } catch (
Exception $e) {
10:         }
11:     }
12: }
13: try {
14:     
$foo foo1();
15:     
var_dump($foo);
16: } catch (
Exception $e) {
17:     do {
18:         
var_dump($e->getMessage());
19:     } while (
$e $e->getPrevious());
20: }
21:
22: function 
foo2() {
23:     try  {
24:         try {
25:             throw new 
Exception("catched");
26:             return 
true;
27:         } 
finally {
28:             try {
29:                 throw new 
Exception("catched");
30:             } catch (
Exception $e) {
31:             }
32:         }
33:     } catch (
Exception $e) {
34:     }
35: }
36:
37:
$foo foo2();
38:
var_dump($foo);
39:
40: function 
foo3() {
41:     try {
42:         throw new 
Exception("not catched");
43:         return 
true;
44:     } 
finally {
45:         try {
46:             throw new 
NotExists();
47:         } catch (
Exception $e) {
48:         }
49:     }
50: }
51:
52:
$bar foo3();
53:

Expected

string(9) "not catch"
NULL

Fatal error: Class 'NotExists' not found in %sbug65784.php on line %d

Output


Diff

001- string(9) "not catch"
002- NULL
004- Fatal error: Class 'NotExists' not found in %sbug65784.php on line %d

 

Generated at Sun, 26 Oct 2014 06:24:57 +0000 (5 days ago)

Copyright © 2005-2014 The PHP Group
All rights reserved.