]> granicus.if.org Git - php/commitdiff
Test for bug #45791
authorScott MacVicar <scottmac@php.net>
Wed, 17 Dec 2008 14:46:42 +0000 (14:46 +0000)
committerScott MacVicar <scottmac@php.net>
Wed, 17 Dec 2008 14:46:42 +0000 (14:46 +0000)
ext/json/tests/bug45791.phpt [new file with mode: 0644]

diff --git a/ext/json/tests/bug45791.phpt b/ext/json/tests/bug45791.phpt
new file mode 100644 (file)
index 0000000..d0c385d
--- /dev/null
@@ -0,0 +1,13 @@
+--TEST--
+Bug #45791 (json_decode() does not handle number 0e0)
+--FILE--
+<?php
+
+var_dump(json_decode('{"zero": 0e0}'));
+
+?>
+--EXPECT--
+object(stdClass)#1 (1) {
+  [u"zero"]=>
+  float(0)
+}