Skip to content

register_shutdown_function with itself as callback false-positive #2998

@ste93cry

Description

@ste93cry

Bug report

Calling register_shutdown_function and passing itself as callback does not work even if it's perfectly valid (it's a common technique used to register a shutdown function as the last of the chain)

Code snippet that reproduces the problem

https://phpstan.org/r/8389a78e-4e74-4c8c-9338-8db9c853c14a

Expected output

No error should be thrown

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions