Skip to content

Sprintf with non-empty-string arguments returns as string #11491

@rubenrubiob

Description

@rubenrubiob

Bug report

I stumbled upon a case where sprintf fails when using non-empty-string arguments. Supposedly, it is fixed in phpstan/phpstan-src#3192 , but it keeps failing.

Am I missing something?

Code snippet that reproduces the problem

https://phpstan.org/r/4c02c50e-2a1d-4169-983c-f3f574df4bfb

Expected output

No errors

Did PHPStan help you today? Did it make you happy in any way?

As always, it helps me catch type issues that could result in bugs. It improves my code greatly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions