Skip to content

Reassignment of $this is not an error #3585

Closed

Description

@luauser32167

No error is reported for:

$this = 1;

But php -l reports Fatal error: Cannot re-assign $this...

Activity

  1. staabm commented on Feb 9, 2026

    @staabm
    Contributor
  2. added this to the Easy fixes milestone on Mar 8, 2026
  3. added a commit that references this issue on Mar 8, 2026
    a275ce9
  4. phpstan-bot commented on Mar 8, 2026

    @phpstan-bot
    Contributor

    Closed via merging phpstan/phpstan-src#5146

  5. added 2 commits that reference this issue on Mar 8, 2026
    c6a1c9b
    a275ce9
  6. added a commit that references this issue on Mar 9, 2026
    d3447e8
  7. added a commit that references this issue on Apr 7, 2026
    419624c
  8. github-actions commented on Apr 9, 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.

  9. locked as resolved and limited conversation to collaborators on Apr 9, 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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions