Skip to content

Commit 501709a

Browse files
committed
Create bug-6799c.php
1 parent d4a22de commit 501709a

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
var_dump($x);
18+
assertType('mixed', $x); // could be string

0 commit comments

Comments
 (0)