Skip to content

posix_getpwnam returns an array of strings and ints #12254

Open
phpstan/phpstan-src
#4091
@JulianAtkins

Description

@JulianAtkins

Bug report

The array returned by the posix_getpwnam() function, returns a bunch of strings and two integers, but PHPStan thinks the returned array contains mixed types.

Code snippet that reproduces the problem

https://phpstan.org/r/00905a41-b2ea-46a9-9d2f-a2551f077ea5

Expected output

No error. I expect PHPStan to know that uid+gid are integers and the rest are strings.

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

Always a pleasure!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions