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