In the following example, we get a false negative:
function ifConditionWithUndefinedArrayAssignment($first) { if ($first) { $things[] = 'person'; // undefined array variable } return $things; // undefined variable, but not reported } This one too:
function loopAndPushWithUndefinedArray($parts) { while ($part = array_shift($parts)) { $suggestions[] = $part; // undefined array variable } return $suggestions; // undefined variable, but not reported } This is because #205 made it so that future uses of a variable after an array push are marked as defined. They need to only do that within the current if or else or loop scope.