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

Expected Test Failure Report for Zend/tests/bug64896.phpt ('Bug #64896 (Segfault with gc_collect_cycles using unserialize on certain objects)')

Script

1: <?php
2: $bar 
NULL;
3: class 
bad
4:
{
5:     private 
$_private = array();
6:
7:     public function 
__construct()
8:     {
9:         
$this->_private[] = 'php';
10:     }
11:
12:     public function 
__destruct()
13:     {
14:         global 
$bar;
15:         
$bar $this;
16:     }
17: }
18:
19:
$foo = new stdclass;
20:
$foo->foo $foo;
21:
$foo->bad = new bad;
22:
23:
gc_disable();
24:
25:
unserialize(serialize($foo));
26:
gc_collect_cycles();
27:
var_dump($bar); 
28:
/*  will output:
29: object(bad)#4 (1) {
30:   ["_private":"bad":private]=>
31:   &UNKNOWN:0
32: }
33: */
34:
?>
35:

Expected

bject(bad)#%d (1) {
  ["_private":"bad":private]=>
  array(1) {
    [0]=>
    string(3) "php"
  }
}

Output

object(bad)#4 (1) {
  ["_private":"bad":private]=>
  NULL
}

Diff

001+ object(bad)#4 (1) {
001- bject(bad)#%d (1) {
003+   NULL
003-   array(1) {
004-     [0]=>
005-     string(3) "php"
006-   }

 

Generated at Thu, 20 Nov 2014 12:38:44 +0000 (5 days ago)

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