Skip to content

functionMap: more precise get_defined_vars#3546

Merged
ondrejmirtes merged 3 commits intophpstan:1.12.xfrom
janedbal:patch-12
Oct 7, 2024
Merged

functionMap: more precise get_defined_vars#3546
ondrejmirtes merged 3 commits intophpstan:1.12.xfrom
janedbal:patch-12

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
@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.

4 participants