1--TEST--
2Serialization of properties should not deal INDIRECT entries to userland
3--FILE--
4<?php
5
6class MyArrayObject extends ArrayObject {
7    private $unused = 123;
8    public function __construct(array $array)
9    {
10        parent::__construct($array, 1);
11    }
12}
13
14class MySplDoublyLinkedList extends SplDoublyLinkedList {
15    private $unused = 123;
16}
17
18class MySplObjectStorage extends SplObjectStorage {
19    private $unused = 123;
20}
21
22$x = new MyArrayObject([]);
23var_dump($x->__serialize());
24
25$x = new MySplDoublyLinkedList();
26var_dump($x->__serialize());
27
28$x = new MySplObjectStorage();
29var_dump($x->__serialize());
30
31?>
32--EXPECTF--
33array(4) {
34  [0]=>
35  int(1)
36  [1]=>
37  array(0) {
38  }
39  [2]=>
40  array(1) {
41    ["%0MyArrayObject%0unused"]=>
42    int(123)
43  }
44  [3]=>
45  NULL
46}
47array(3) {
48  [0]=>
49  int(0)
50  [1]=>
51  array(0) {
52  }
53  [2]=>
54  array(1) {
55    ["%0MySplDoublyLinkedList%0unused"]=>
56    int(123)
57  }
58}
59array(2) {
60  [0]=>
61  array(0) {
62  }
63  [1]=>
64  array(1) {
65    ["%0MySplObjectStorage%0unused"]=>
66    int(123)
67  }
68}
69