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 c25ea11 commit 7f0871cCopy full SHA for 7f0871c
tests/PHPStan/Rules/Pure/data/pure-function.php
@@ -171,4 +171,16 @@ function bug13288(array $a)
171
array_push($a, function() { // error because by ref arg
172
exit(); // ok, as array_push() will not invoke the function
173
});
174
+
175
+ array_push($a, // error because by ref arg
176
+ fn() => exit() // ok, as array_push() will not invoke the function
177
+ );
178
179
+ $closure = function() {
180
+ exit();
181
+ };
182
183
+ $closure // ok, as array_push() will not invoke the function
184
185
}
186
0 commit comments