|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-08-13 19:15 UTC] cmb@php.net
[2017-08-13 19:15 UTC] cmb@php.net
-Status: Open
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 15:00:01 2025 UTC |
Description: ------------ WDDX does locale aware conversion from double to string. Unfortunately it does not support locale aware conversion back to double. Anyways: I would suggest to disable locale aware conversion and always use a point (.) as decimal seperator. Test script: --------------- setlocale(LC_ALL , "German"); $x = Array("XYZ"=>5.1); $y = wddx_serialize_value($x); var_dump($y); $z = wddx_deserialize($y); var_dump($z); echo ($x == $z) ? "OK" : "FAIL"; Expected result: ---------------- string(120) "<wddxPacket version='1.0'><header/><data><struct><var name='XYZ'><number>5.1</number></var></struct></data></wddxPacket>" array(1) { ["XYZ"]=> float(5.1) } OK Actual result: -------------- string(120) "<wddxPacket version='1.0'><header/><data><struct><var name='XYZ'><number>5,1</number></var></struct></data></wddxPacket>" array(1) { ["XYZ"]=> int(5) } FAIL