xref: /PHP-7.2/ext/spl/tests/bug71838.phpt (revision 17ccbeec)
1--TEST--
2Bug #71839: Deserializing serialized SPLObjectStorage-Object can't access properties in PHP
3--FILE--
4<?php
5
6class A extends SplObjectStorage {
7    protected $a = null;
8
9    public function __construct() {
10        $this->a = '123';
11    }
12
13    public function getA() {
14        return $this->a;
15    }
16}
17
18$serialized = serialize(new A());
19$obj = unserialize($serialized);
20var_dump($obj->getA());
21
22?>
23--EXPECT--
24string(3) "123"
25