Skip to content

sprintf with float modifier is not considered as numeric-string on "subcalls" #7387

@kissifrot

Description

@kissifrot

Bug report

When called directly, a sprintf() with float modifier is correctly considerd as numeric-string.
However, when called indirectly (sorry I can't find the correct word to describe it), looks like infered type is lost and we get non-empty-string instead

Code snippet that reproduces the problem

https://phpstan.org/r/546a013a-1028-41d6-9256-2528c6123498

Expected output

Both calls should yield the same result

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

This tool saved me quite oa lot of problems :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions