We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d4a22de commit 501709aCopy full SHA for 501709a
1 file changed
tests/PHPStan/Analyser/nsrt/bug-6799c.php
@@ -0,0 +1,18 @@
1
+<?php declare(strict_types = 1);
2
+
3
+namespace Bug6799C;
4
5
+use function PHPStan\Testing\assertType;
6
7
+// https://3v4l.org/g5UjS
8
9
+$a = [&$x];
10
+function doFoo(array &$arr) {
11
+ $arr[0] = 'string';
12
+}
13
14
+var_dump($x);
15
+assertType('mixed', $x);
16
+doFoo($a);
17
18
+assertType('mixed', $x); // could be string
0 commit comments