|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2015-11-23 15:16 UTC] laruence@php.net
  [2015-11-23 15:16 UTC] laruence@php.net
 
-Status: Open
+Status: Closed
  [2015-11-25 02:21 UTC] ab@php.net
  [2015-11-25 16:01 UTC] laruence@php.net
  [2016-07-20 11:35 UTC] davey@php.net
  [2016-07-20 11:35 UTC] davey@php.net
 | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 01:00:01 2025 UTC | 
Description: ------------ If you unserialize ArrayObject extended object, protected properties are not getting restored. In all previous php versions behavior was different, and I was unable to find any indications in docs that this has changed. Test script: --------------- class testObject extends ArrayObject { protected $test; public function getTest() { return $this->test; } public function setTest($test) { $this->test = $test; } } $obj = new testObject(); $obj->setTest('test'); var_dump($obj->getTest()); $obj2 = unserialize(serialize($obj)); var_dump($obj2->getTest()); Expected result: ---------------- string(4) "test" string(4) "test" Actual result: -------------- string(4) "test" NULL