1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-02 17:52:45 +01:00
psalm/docs/running_psalm/issues/InvalidLiteralArgument.md
2021-01-29 11:38:57 +01:00

277 B

InvalidLiteralArgument

Emitted when a literal argument is passed where a variable is expected, such as the first argument of strpos, where an explicit $haystack is almost always unintended.

<?php

function foo(string $s) : void {
    echo strpos(".", $s);
}