ID: 30917
Updated by: [EMAIL PROTECTED]
Reported By: dmirand at abelia-decors dot com
-Status: Open
+Status: Feedback
Bug Type: Class/Object related
Operating System: Linux (64bit only!)
PHP Version: 4.3.9
New Comment:
Replace the print_r() with var_dump() please.
And paste the result you get.
Previous Comments:
------------------------------------------------------------------------
[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