diff --git a/VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithGlobalVarFixture.php b/VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithGlobalVarFixture.php index 5ac38c22..2526cc17 100644 --- a/VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithGlobalVarFixture.php +++ b/VariableAnalysis/Tests/CodeAnalysis/fixtures/FunctionWithGlobalVarFixture.php @@ -38,3 +38,15 @@ function updateGlobal($newVal) { function unusedGlobal() { global $myGlobal; // should warn that var is unused } + +function updateGlobalWithList($newVal) { + global $myGlobal; + list( $myGlobal, $otherVar ) = my_function($newVal); + echo $otherVar; +} + +function updateGlobalWithListShorthand($newVal) { + global $myGlobal; + [ $myGlobal, $otherVar ] = my_function($newVal); + echo $otherVar; +}