No error is reported for: ```php $this = 1; ``` But php -l reports ```Fatal error: Cannot re-assign $this...```
Activity
staabm commentedon Feb 9, 2026
another repro
https://phpstan.org/r/28b4faa1-edb4-4790-89d7-9c17b181943b
https://3v4l.org/gSRUE#veol
Report error when $this is re-assigned
Fix phpstan/phpstan#3585: Reassignment of $this is not an error (#5146)
phpstan-bot commentedon Mar 8, 2026
Closed via merging phpstan/phpstan-src#5146
Updated PHPStan to commit c6a1c9b86a12f33688ab6d9d1247091a4a66299e
Updated PHPStan to commit a275ce9e08319fb9f3fc362ef51b7b163c44c377
Fix phpstan/phpstan#3585: Reassignment of $this is not an error (phps…
Fix phpstan/phpstan#3585: Reassignment of $this is not an error (phps…
github-actions commentedon Apr 9, 2026
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.