php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay

| files >> /var/www/html/sub/images/Rm19_symconf/root/php-7.1.11/ext/standard/tests/serialize/ |
| files >> //var/www/html/sub/images/Rm19_symconf/root/php-7.1.11/ext/standard/tests/serialize/bug31402.phpt |
--TEST--
Bug #31402 (unserialize() generates references when it should not)
--INI--
error_reporting=E_ALL
--FILE--
<?php
class TestX {
var $i;
function __construct($i) {
$this->i = $i;
}
}
class TestY {
var $A = array();
var $B;
function __construct() {
$this->A[1] = new TestX(1);
$obj = new TestX(2);
$this->A[2] = & $obj;
$this->A[3] = & $this->A[2];
$this->B = $this->A[1];
}
}
$before = new TestY();
$ser = serialize($before);
$after = unserialize($ser);
var_dump($before, $after);
?>
===DONE===
--EXPECTF--
object(TestY)#%d (2) {
["A"]=>
array(3) {
[1]=>
object(TestX)#%d (1) {
["i"]=>
int(1)
}
[2]=>
&object(TestX)#%d (1) {
["i"]=>
int(2)
}
[3]=>
&object(TestX)#%d (1) {
["i"]=>
int(2)
}
}
["B"]=>
object(TestX)#%d (1) {
["i"]=>
int(1)
}
}
object(TestY)#%d (2) {
["A"]=>
array(3) {
[1]=>
object(TestX)#%d (1) {
["i"]=>
int(1)
}
[2]=>
&object(TestX)#%d (1) {
["i"]=>
int(2)
}
[3]=>
&object(TestX)#%d (1) {
["i"]=>
int(2)
}
}
["B"]=>
object(TestX)#%d (1) {
["i"]=>
int(1)
}
}
===DONE===
y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`