Skip to content

Sscanf Array Index #7563

@oleibman

Description

@oleibman

Bug report

Sscanf generates a 2-item array, but Phpstan claims that index 1 of the result does not exist.

Code snippet that reproduces the problem

[]
(https://phpstan.org/r/2658a927-8733-4d61-8f84-7072c4c3d2c9)

Expected output

Scan should be clean. Phpstan reports "Offset 1 does not exist on array{string}."

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

Yes, I am quite satisfied with it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions