Skip to content

Support returned value from Closure::bind callback #11953

Closed
phpstan/phpstan-src
#5857

Description

@janedbal

Feature request

See snippet: https://phpstan.org/r/98a960ac-e803-41a5-9280-f039f12fca44

Expected result: Closure(): int

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

No response

Activity

  1. phpstan-bot commented on Jun 13, 2026

    @phpstan-bot
    Collaborator

    @janedbal After the latest push in 2.2.x, PHPStan now reports different result with your code snippet:

    @@ @@
    -16: Dumped type: Closure(): mixed
    +16: Dumped type: ((Closure(): mixed)|null)
    Full report
    Line Error
    16 `Dumped type: ((Closure(): mixed)
  2. github-actions commented on Oct 4, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  3. locked as resolved and limited conversation to collaborators on Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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