php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1952 s/printf mishandles leading-zero padding with negative values
Submitted: 1999-08-03 14:40 UTC Modified: 1999-08-03 15:52 UTC
From: Ken dot Coar at Golux dot Com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0 Latest CVS (03/08/1999) OS: RH Linux 5.2
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: Ken dot Coar at Golux dot Com
New email:
PHP Version: OS:

 

 [1999-08-03 14:40 UTC] Ken dot Coar at Golux dot Com
<?php
    printf("%05d\n", -400);
?>

results in a display of "0-400" instead of "-0400".

I built mod_php3 from the latest CVS as of to-day, with only the mysql additional
module.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-08-03 15:52 UTC] rasmus at cvs dot php dot net
Fixed in CVS
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 13:00:01 2026 UTC