Skip to content

Array returned from time_nanosleep() isn't seen to have the correct contents #8097

@nach-code

Description

@nach-code

time_nanosleep() might return an array. If it does, it contains seconds and nanoseconds. https://www.php.net/manual/en/function.time-nanosleep.php

However, PHPStan thinks accessing this is an error:

https://phpstan.org/r/e1b5c862-77ed-479e-abca-ba6a77e3df76

Offset 'nanoseconds' does not exist on array{int<0, max>, int<0, max>}.
Offset 'seconds' does not exist on array{int<0, max>, int<0, max>}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions