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.
1 parent fd217f2 commit 8611e83Copy full SHA for 8611e83
VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithGlobalVarFixture.php
@@ -38,3 +38,15 @@ function updateGlobal($newVal) {
38
function unusedGlobal() {
39
global $myGlobal; // should warn that var is unused
40
}
41
+
42
+function updateGlobalWithList($newVal) {
43
+ global $myGlobal;
44
+ list( $myGlobal, $otherVar ) = my_function($newVal);
45
+ echo $otherVar;
46
+}
47
48
+function updateGlobalWithListShorthand($newVal) {
49
50
+ [ $myGlobal, $otherVar ] = my_function($newVal);
51
52
0 commit comments