#30917 [Fbk->NoF]: Wrong keys in serialized obj's array
ID: 30917
Updated by: php-bugs@lists.php.net
Reported By: dmirand at abelia-decors dot com
-Status: Feedback
+Status: No Feedback
Bug Type: Class/Object related
Operating System: Linux (64bit only!)
PHP Version: 4.3.9
New Comment:
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
Previous Comments:
------------------------------------------------------------------------
[2005-01-18 12:43:12] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2005-01-18 12:42:43] sniper@php.net
Replace the print_r() with var_dump() please.
And paste the result you get.
------------------------------------------------------------------------
[2004-11-27 05:57:10] dmirand at abelia-decors dot com
Description:
------------
With objects storing an array with key values >= 2e31
(2147483648), these keys are altered after a serialize +
unserialize.
Occurs only on 64bit systems.
Reproduce code:
---------------
class Test {
var $arr = array() ;
function define_tab() {
$noscde = "5000000000" ;
$this->arr[$noscde]['noscde'] = $noscde ;
}
function get_tab() { return $this->arr; }
}
$obj = new Test() ;
$obj->define_tab() ;
print_r( $obj->get_tab() ) ;
$pok = serialize( $obj ) ;
$obj = unserialize( $pok ) ;
print_r( $obj->get_tab() ) ;
Expected result:
----------------
Array ( [5000000000] => Array ( [noscde] => 5000000000 ) )
Array ( [5000000000] => Array ( [noscde] => 5000000000 ) )
Actual result:
--------------
Array ( [5000000000] => Array ( [noscde] => 5000000000 ) )
Array ( [705032704] => Array ( [noscde] => 5000000000 ) )
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30917&edit=1
Thread (6 messages)