diff --git a/tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php b/tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php index fbfee4b77ee..c7aacb4000c 100644 --- a/tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php +++ b/tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php @@ -1406,4 +1406,9 @@ public function testJsonValidate(): void ]); } + public function testBug4608(): void + { + $this->analyse([__DIR__ . '/data/bug-4608.php'], []); + } + } diff --git a/tests/PHPStan/Rules/Functions/data/bug-4608.php b/tests/PHPStan/Rules/Functions/data/bug-4608.php new file mode 100644 index 00000000000..7a64e071b87 --- /dev/null +++ b/tests/PHPStan/Rules/Functions/data/bug-4608.php @@ -0,0 +1,15 @@ +{$s}(); + call_user_func([$c, $s]); + [$c, $s](); +}