Skip to content

functionMap: more precise get_defined_vars #3546

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 3 commits into from
Oct 7, 2024

Conversation

janedbal
Copy link
Contributor

@janedbal janedbal commented Oct 7, 2024

No description provided.

Co-authored-by: Markus Staab <maggus.staab@googlemail.com>
@thg2k
Copy link
Contributor

thg2k commented Oct 7, 2024

@staabm The first version array<string, mixed> was the correct one:

<?php
$GLOBALS[""] = true;
var_dump(array_keys(get_defined_vars()));

https://3v4l.org/B2n4H

@ondrejmirtes ondrejmirtes merged commit 0df14b1 into phpstan:1.12.x Oct 7, 2024
473 of 499 checks passed
@ondrejmirtes
Copy link
Member

Thank you.

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.

None yet

4 participants