diff --git a/src/Analyser/MutatingScope.php b/src/Analyser/MutatingScope.php index d98c716fe1..bbd489a844 100644 --- a/src/Analyser/MutatingScope.php +++ b/src/Analyser/MutatingScope.php @@ -4100,6 +4100,8 @@ public function unsetExpression(Expr $expr): self $this->getType($expr->var)->unsetOffset($this->getType($expr->dim)), )->invalidateExpression( new FuncCall(new FullyQualified('count'), [new Arg($expr->var)]), + )->invalidateExpression( + new FuncCall(new FullyQualified('sizeof'), [new Arg($expr->var)]), ); }