Skip to content

Fix crash on dynamic numeric-string symbols #3975

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 30, 2025
Merged

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Apr 30, 2025

Comment on lines +13 to +16
$b = '0';
$o->{$b}();
$o::{$b}();
echo $o::{$b};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think these cases are realistic, but I fixed them to keep the implementation of the 4 rules in sync

@staabm staabm marked this pull request as ready for review April 30, 2025 10:45
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@ondrejmirtes
Copy link
Member

Perfect, thank you!

@ondrejmirtes ondrejmirtes merged commit 2ac87fc into phpstan:2.1.x Apr 30, 2025
416 of 418 checks passed
@staabm staabm deleted the crash branch April 30, 2025 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

My code provokes an internal error in phpstan
3 participants