php-src/ext/spl/tests/bug71838.phpt
2018-10-14 19:45:12 +02:00

25 lines
432 B
PHP

--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"