PHP compat 5-8
[m6w6/ext-json_post] / tests / 003.phpt
1 --TEST--
2 json_post with > 32bits integer as float on 32bits
3 --SKIPIF--
4 <?php
5 extension_loaded("json_post") or die("skip need json_post support\n");
6 if (PHP_INT_SIZE != 4) die("skip this test is for 32bits platform only");
7 ?>
8 --INI--
9 json_post.flags=2;JSON_BIGINT_AS_STRING
10 --POST_RAW--
11 Content-type: text/json
12
13 {
14 "bigint": 12345678901234
15 }
16 --FILE--
17 <?php
18 var_dump($_POST, json_last_error());
19 ?>
20 Done
21 --EXPECTF--
22 object(stdClass)#%d (1) {
23 ["bigint"]=>
24 string(14) "12345678901234"
25 }
26 int(0)
27 Done