1--TEST--
2SPL: Test that __unserialize converts references to non-references
3--FILE--
4<?php
5
6$s = new SplObjectStorage();
7$y = 1;
8$o = new stdClass();
9$x = [$o, &$y];
10$s->__unserialize([$x, []]);
11var_dump($s);
12$val = $s[$o];
13$val = 123;
14var_dump($s);
15?>
16--EXPECT--
17object(SplObjectStorage)#1 (1) {
18  ["storage":"SplObjectStorage":private]=>
19  array(1) {
20    [0]=>
21    array(2) {
22      ["obj"]=>
23      object(stdClass)#2 (0) {
24      }
25      ["inf"]=>
26      int(1)
27    }
28  }
29}
30object(SplObjectStorage)#1 (1) {
31  ["storage":"SplObjectStorage":private]=>
32  array(1) {
33    [0]=>
34    array(2) {
35      ["obj"]=>
36      object(stdClass)#2 (0) {
37      }
38      ["inf"]=>
39      int(1)
40    }
41  }
42}
43