Edit report at http://bugs.php.net/bug.php?id=53301&edit=1
ID: 53301 Comment by: rbysa at yahoo dot com Reported by: rbysa at yahoo dot com Summary: http_build_query unexpected behavior Status: Open Type: Bug Package: *General Issues Operating System: Ubuntu PHP Version: 5.3.3 Block user comment: N New Comment: Also I do want to mention that I saw the previous bug report on this issue http://bugs.php.net/bug.php?id=49023 However this bug report has been labeled "bogus" even though the documentation does not support the mentioned behavior. Previous Comments: ------------------------------------------------------------------------ [2010-11-12 20:26:35] rbysa at yahoo dot com Description: ------------ http_build_query truncates large integer keys to 12 digits regardless of them being passed as a string, integer, or float. However if the integer value is cast to a string and appended with non-integer characters the key is not truncated. Test script: --------------- $var = 1234567890123 echo http_build_query($var); $var = (string)1234567890123 echo http_build_query($var); $var = (float)1234567890123 echo http_build_query($var); $var = "1234567890123.asd" echo http_build_query($var); Expected result: ---------------- Array([0]=>1234567890123) Array([0]=>1234567890123) Array([0]=>1234567890123) Array([0]=>"1234567890123.asd") Actual result: -------------- Array([0]=>123456789012) Array([0]=>123456789012) Array([0]=>123456789012) Array([0]=>"1234567890123.asd") ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53301&edit=1
