|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-02-10 21:43 UTC] felipe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 01:00:01 2025 UTC |
Description: ------------ Numeric Id keys for stdObj are lost after serializing and unseriliazing Reproduce code: --------------- $test = new stdClass(); $Id = 12; $test->$Id = new stdClass(); $test->$Id->value = 12; $Id = '23'; $test->$Id = new stdClass(); $test->$Id->value = '23'; var_dump($test); $ser = serialize($test); $unser = unserialize($ser); echo '<hr />'; var_dump($unser); die('die'); Expected result: ---------------- I would expect both dumps to be the same and the numeric Id keys be there after serializing Actual result: -------------- After serializing and Unserializing the numeric Id keys are lost