xref: /PHP-7.1/ext/wddx/tests/bug41283.phpt (revision f3ad3a77)
1--TEST--
2Bug #41283 (Bug with serializing array key that are doubles or floats)
3--SKIPIF--
4<?php if (!extension_loaded("wddx")) print "skip"; ?>
5--FILE--
6<?php
7$data = array(
8  'somearray' => array('1.1' => 'One 1','1.2' => 'One 2', '1.0' => 'Three')
9);
10
11var_dump(wddx_deserialize(wddx_serialize_vars('data')));
12?>
13--EXPECT--
14array(1) {
15  ["data"]=>
16  array(1) {
17    ["somearray"]=>
18    array(3) {
19      ["1.1"]=>
20      string(5) "One 1"
21      ["1.2"]=>
22      string(5) "One 2"
23      ["1.0"]=>
24      string(5) "Three"
25    }
26  }
27}
28