summaryrefslogtreecommitdiff
path: root/ext/spl/tests/bug71838.phpt
blob: 44fc761ceb1844ac51a49ec7c3a178b3bbe96f7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--TEST--
Bug #71839: Deserializing serialized SPLObjectStorage-Object can't access properties in PHP
--FILE--
<?php

class A extends SplObjectStorage {
    protected $a = null;

    public function __construct() {
        $this->a = '123';
    }
    
    public function getA() {
        return $this->a;
    }
}

$serialized = serialize(new A());
$obj = unserialize($serialized);
var_dump($obj->getA());

?>
--EXPECT--
string(3) "123"