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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: adler at bnl dot gov
New email:
PHP Version: OS:

 

 [2001-09-05 10:09 UTC] adler at bnl dot gov
sprintf("%08x",1<<31)  generates -80000000, should generate 80000000.

That's it!

Patches

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 17:01:30 2025 UTC