We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
_G
1 parent 62806b6 commit 20d565bCopy full SHA for 20d565b
src/XmlFileParser.php
@@ -193,8 +193,8 @@ private function childHasInterestingData(Frame $child): bool
193
194
private function wrapInGIfNeeded(string $name): string
195
{
196
- if (!preg_match('/^[A-z][A-z0-9]*$/', $name)) {
197
- return '_G["' . str_replace('"', '\\"', $name) . '"]';
+ if (str_contains($name, '$') || str_contains($name, '-')) {
+ return '_G["' . $name . '"]';
198
}
199
200
return $name;
0 commit comments