Psalm
Get started
Documentation
Paid support
Plugins
Blog
GitHub
<?php /** * @psalm-param array<array-key, string> $bars */ function foo(array $bars): void { } /** * @psalm-param list<string> $bars */ function otherFoo(array $bars): void { } class Bar { public function __toString() { return 'bar'; } } foo([new Bar()]); otherFoo([new Bar()]);
Snippet created on March 2 2021 at 15:08 UTC
Settings
Get link