php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13150 sprintf("%08x",1<<31) generates -80000000
Submitted: 2001-09-05 10:09 UTC Modified: 2001-09-05 16:03 UTC
From: adler at bnl dot gov Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.0.6 OS: linux
Private report: No CVE-ID: None
 [2001-09-05 10:09 UTC] adler at bnl dot gov
sprintf("%08x",1<<31)  generates -80000000, should generate 80000000.

That's it!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-05 10:20 UTC] stas@php.net
BTW: there's no such interer as 0x80000000 in PHP. PHP is limited by signed long.
 [2001-09-05 16:03 UTC] adler at bnl dot gov
Do you have a workaround?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 07:01:31 2024 UTC