Skip to editor
Psalm
Docs
Playground
Plugins
Blog
Paid support
Share
Fix issues
Show original
PHP
Settings
<?php /** * @template T as true|false * @param T $getAll * @return (T is true ? list<int> : int) */ function get(bool $getAll): int|array { if ($getAll) { return [1,2,3]; } else { return 1; } } get(false); // int get(true); // list<int>
Issues
Types
idle
Saved Jan 19 2022 13:47 UTC
⌘/Ctrl+Enter
run
⌘/Ctrl+S
share
F8
/
⇧F8
next/prev issue