ID: 30695 Updated by: [EMAIL PROTECTED] Reported By: php_bug at cklowe dot com -Status: Open +Status: Bogus Bug Type: Math related Operating System: Win32 PHP Version: 4CVS-2004-11-05 (stable) New Comment:
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 PHP does not support unsigned integers. Previous Comments: ------------------------------------------------------------------------ [2004-11-05 18:35:57] php_bug at cklowe dot com Description: ------------ Large integers are being saturated to the maximum signed value (0x7fffffff) as opposed to being treated as the unsigned values. Panic! I had code that set the high bit in a Permissions variable when some condition was met. After changing PHP versions because of bug 25570, I found user reports of "Why have I got all these additional permissions?" and "I've now got Admin rights, OOoooh. What happens if I run this SQL query in the page I now have access to?". Reproduce code: --------------- define ("BIG_NUM", 0x80000000); $big_var = 0x80000000; echo sprintf("%08x, %08x", BIG_NUM, $big_var); Expected result: ---------------- 80000000,80000000 Actual result: -------------- 7fffffff, 7fffffff ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30695&edit=1
