Subject: | int error ? |
$key = '020';
$value = '001';
$a->{$key} = $value;
print serialize( $a );
result is
a:1:{i:20;i:1;}
but it's not the result i want.
i assign $key, and $value is a string;
but it will convert to int after serialization...
I check the source code...,
line :380
if ( $val =~ /^-?\d{1,10}$/ && abs($val) < 2**31 ) {
i modify to
if ( $val =~ /^-?[1,9]{1,10}$/ && abs($val) < 2**31 ) {
and it works.
if my modification don't get some errors or warnings , could you modify it ?
Thx ^^