From 09a575a20fd47c506f1cb4d0365f8cff2904fcba Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Wed, 16 May 2007 12:54:30 +0000 Subject: MFH: fix #41403 (json_decode cannot decode floats if localeconv decimal_point is not '.') --- ext/json/tests/bug41403.phpt | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 ext/json/tests/bug41403.phpt (limited to 'ext/json/tests/bug41403.phpt') diff --git a/ext/json/tests/bug41403.phpt b/ext/json/tests/bug41403.phpt new file mode 100644 index 0000000000..80576c85b1 --- /dev/null +++ b/ext/json/tests/bug41403.phpt @@ -0,0 +1,41 @@ +--TEST-- +Bug #41403 (json_decode cannot decode floats if localeconv decimal_point is not '.') +--SKIPIF-- + +--INI-- +precision=14 +--FILE-- + +--EXPECTF-- +array(1) { + [0]=> + float(2,1) +} +array(1) { + [0]=> + float(0,15) +} +array(1) { + [0]=> + float(123,13452345) +} +array(2) { + [0]=> + int(123) + [1]=> + int(13452345) +} +Done -- cgit v1.2.1