php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62 s/printf() problem with %% in format string
Submitted: 1998-02-12 01:31 UTC Modified: 1998-02-13 11:54 UTC
From: walton at nordicdms dot com Assigned:
Status: Closed Package: Other
PHP Version: 3.0b4 OS: WinNT
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: walton at nordicdms dot com
New email:
PHP Version: OS:

 

 [1998-02-12 01:31 UTC] walton at nordicdms dot com
%% appears to steal an argument from the s/printf()
argument list.  When %% is the last %-construct in the
format string, the lack of an argument is silently ignored.
In other cases, unpleasant things happen:

printf("%d %%",1);
1 %

printf("%d %% %d",1,2);
Warning:  sprintf: too few arguments

printf("%d %% %d",1,2,3);
1 % 3


Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-02-13 11:54 UTC] zeev
Fixed by Stig
 [2023-09-23 18:29 UTC] git@php.net
Automatic comment on behalf of julionc
Revision: https://github.com/php/doc-es/commit/ffffb45a4341f0ccf8cef220a365ce260388a088
Log: Update recommended.xml
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Sep 08 00:01:27 2024 UTC