|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #60755 "*" modifier for sprintf
Submitted: 2012-01-14 18:34 UTC Modified: 2020-05-27 10:23 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: dohardgopro at gmail dot com Assigned: nikic (profile)
Status: Closed Package: SPL related
PHP Version: Irrelevant OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: dohardgopro at gmail dot com
New email:
PHP Version: OS:


 [2012-01-14 18:34 UTC] dohardgopro at gmail dot com
Hi all, I'v add support of "*" modifier for sprintf, it exist in sprintf C 
implementation (

My patch attached

Test script:
sprintf("%.*f", 2, 2) // output "2.00"
sprintf("%.2f", 2) // output "2.00"


formatted_print (last revision 2012-01-14 18:35 UTC by dohardgopro at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-04-21 16:35 UTC]
-Assigned To: +Assigned To: nikic
 [2020-05-27 10:23 UTC]
-Status: Assigned +Status: Closed
 [2020-05-27 10:23 UTC]
Support for * has been added in PHP 8.0:
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Dec 10 06:05:52 2022 UTC