#49023 [Bgs]: http_build_query() truncates 64-bit integers

From: Date: Mon, 27 Jul 2009 08:12:58 +0000
Subject: #49023 [Bgs]: http_build_query() truncates 64-bit integers
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-140314@lists.php.net to get a copy of this message
ID: 49023 User updated by: thedazedsmart1 at yahoo dot ca Reported By: thedazedsmart1 at yahoo dot ca Status: Bogus Bug Type: URL related Operating System: Unbuntu PHP Version: 5.2.10 New Comment: Can you please produce the line in documentation explaining your statement? I can find no mention of sensitivity to the types used in the formdata parameter. formdata: "[m]ay be an array or object containing properties." Previous Comments: ------------------------------------------------------------------------ [2009-07-26 14:53:41] iliaa@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Pass the value as a string or as a float. The truncation is actually done by PHP, during array creation, not by the http_build_query() function. ------------------------------------------------------------------------ [2009-07-22 22:21:10] thedazedsmart1 at yahoo dot ca Description: ------------ http_build_query doesn't handle 64-bit integers even on 64-bit systems, truncates to 12 digits only. Reproduce code: --------------- --- From manual page: function.http-build-query --- $args = array("test" => 100000012859481); $output = http_build_query($args); var_dump($output); Expected result: ---------------- string(17) "test=100000012859481" Actual result: -------------- string(17) "test=100000012859" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=49023&edit=1

« previous php.bugs (#140314) next »