It seems storing integers over the unsigned limits results in errors when unserializing an 'array string'. I.e. this code:
Code: Select all
<?php
$test = unserialize('a:1:{s:5:"value";i:2147483648;}');
print_r($test);
?>Code: Select all
<?php
$test = unserialize('a:1:{s:5:"value";i:2147483647;}');
print_r($test);
?>So I figured I could add something like this for the bigger ints:
Code: Select all
$diff = 2147483648 + $test["value"];
$test["value"] = $diff + 2147483648;So..: how should i go about unserializing an array with big integers? is there some easier way to store arrays with big ints in a database?
thanks, aye