Psalm
Get started
Documentation
Paid support
Plugins
Blog
GitHub
<?php /** * @return ( * $s is non-empty-literal-string ? float : int * ) */ function foo(string $s) { return 1.0; // Obviously wrong } /** @var literal-string $b */ $b /** @psalm-trace $a */ $a = foo($b); /** @var string $b */ $b /** @psalm-trace $a */ $a = foo($b);
Snippet created on April 17 2024 at 22:35 UTC
Settings
Get link