Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2105058

Browse files
staabmondrejmirtes
authored andcommitted
Added regression test
1 parent 9437056 commit 2105058

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎tests/PHPStan/Analyser/nsrt/bug-11699.php‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,12 @@ function doFoo3():void {
4040
assertType("'.'", $match['AB']);
4141
}
4242
}
43+
44+
function doFoo4():void {
45+
$string = 'Foo.bar';
46+
$match = [];
47+
$result = preg_match('~(?<AB>[^\~,\?\.])~', $string, $match);
48+
if ($result === 1) {
49+
assertType("non-empty-string", $match['AB']);
50+
}
51+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /