xref: /PHP-5.4/ext/json/tests/008.phpt (revision 6eb42184)
1--TEST--
2json_decode() with large integers
3--SKIPIF--
4<?php if (!extension_loaded("json")) print "skip"; ?>
5--FILE--
6<?php
7$json = '{"largenum":123456789012345678901234567890}';
8$x = json_decode($json);
9var_dump($x->largenum);
10$x = json_decode($json, false, 512, JSON_BIGINT_AS_STRING);
11var_dump($x->largenum);
12echo "Done\n";
13?>
14--EXPECT--
15float(1.2345678901235E+29)
16string(30) "123456789012345678901234567890"
17Done
18