1
0
mirror of https://github.com/php/php-src.git synced 2026-03-29 03:32:20 +02:00
Files
archived-php-src/ext/spl/tests/bug71838.phpt
Nikita Popov 094c808374 Fix bug #71838
2016-03-18 19:58:52 +01:00

25 lines
436 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"