-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
phpstan/phpstan-src
#2543Labels
Milestone
Description
Bug report
As per the php doc for printf-like functions:
Width
Either an integer that says how many characters (minimum) this conversion should result in, or *. If * is used, then the width is supplied as an additional integer value preceding the one formatted by the specifier.
If * is used as the width, phpstan complains about Call to printf contains 0 placeholders, 2 values given.
printf("%0*d", 5, 1);Code snippet that reproduces the problem
https://phpstan.org/r/5b266f50-2c92-41c3-a374-72df3982d659
Expected output
Phpstan should detect the variable width and accept one argument in addition to the one to format.
Did PHPStan help you today? Did it make you happy in any way?
No response
Reactions are currently unavailable