Skip to editor
Psalm
Docs
Playground
Plugins
Blog
Paid support
Share
Fix issues
Show original
PHP
Settings
<?php /** * @template T */ interface Type { /** * @psalm-assert-if-true T $value */ public function matches(mixed $value): bool; } /** * @return Type<non-empty-string> */ function non_empty_string_type(): Type { exit(0); } /** * @return Type<int> */ function int_type(): Type { exit(0); } /** * @template T * @param list<Type<T>> $_types * @return Type<list<T>> */ function list_type(array $_types): Type { exit(0); } $a = non_empty_string_type(); $b = int_type(); $c = list_type([$a, $b]); $_d = list_type([$a, $b, $c]);
Issues
Types
idle
Saved Oct 3 2021 15:18 UTC
⌘/Ctrl+Enter
run
⌘/Ctrl+S
share
F8
/
⇧F8
next/prev issue