1--TEST--
2References to objects for which Serializable::serialize() returned NULL should use N;
3--FILE--
4<?php
5
6class NotSerializable implements Serializable {
7    public function serialize() {
8        return null;
9    }
10
11    public function unserialize($serialized) {
12    }
13}
14
15$obj = new NotSerializable();
16$data = [$obj, $obj];
17var_dump($s = serialize($data));
18var_dump(unserialize($s));
19
20?>
21--EXPECT--
22string(18) "a:2:{i:0;N;i:1;N;}"
23array(2) {
24  [0]=>
25  NULL
26  [1]=>
27  NULL
28}
29