|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-08-10 13:58 UTC] clemens at gutweiler dot net
Description:
------------
The vartype of the 123 key changed after serialization, it should be consistent.
Reproduce code:
---------------
<?php
$data = array(
'123' => 'zahl',
'Foo' => 'bar',
);
var_dump( $data );
var_dump( wddx_deserialize( wddx_serialize_value( $data ) ) );
highlight_file( __FILE__ );
?>
Expected result:
----------------
array(2) {
["123"]=>
string(4) "zahl"
["Foo"]=>
string(3) "bar"
}
array(2) {
["123"]=>
string(4) "zahl"
["Foo"]=>
string(3) "bar"
}
Actual result:
--------------
array(2) {
[123]=>
string(4) "zahl"
["Foo"]=>
string(3) "bar"
}
array(2) {
["123"]=>
string(4) "zahl"
["Foo"]=>
string(3) "bar"
}
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 08:00:01 2025 UTC |
Actually it's not WDDX issue, but general issue with numeric array index not staying as string but getting silently changed to integer: <?php $a = array ('123' => 'abc', 'abc' => '123'); var_dump($a); ?> Outputs: array(2) { [123]=> string(3) "abc" ["abc"]=> string(3) "123" } Although this is pretty old issue, Dmitry, can you check?