Annotation of embedaddon/php/ext/json/tests/008.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: json_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);
! 9: var_dump($x->largenum);
! 10: $x = json_decode($json, false, 512, JSON_BIGINT_AS_STRING);
! 11: var_dump($x->largenum);
! 12: echo "Done\n";
! 13: ?>
! 14: --EXPECT--
! 15: float(1.2345678901235E+29)
! 16: string(30) "123456789012345678901234567890"
! 17: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>