Subject: | Unable to achieve a round trip |
The test, t/10intRT48594.t has the following code:
my $data = {'0' => '0'};
$str = PHP::Serialization::serialize( $data );
is($str,'a:1:{i:0;i:0;}', 'Keys and vals are ints for 0');
If you take the string returned in $str and pass it to PHP::Serialization::unserialize($str), you will get back an array ref, not a hash ref. In other words, you don't get a clean round-trip.
$struct = PHP::Serialization::unserialize($str);
is_deeply($struct, $data, 'Successful round trip.');
You'll find that the structure returned by unserialize is an array. An unsuccessful round trip seems like a problem.