Skip to editor
Psalm
Docs
Playground
Plugins
Blog
Paid support
Share
Fix issues
Show original
PHP
Settings
<?php declare(strict_types = 1); /** * @template TKey of array-key * @template TValue */ interface Map { /** * @template TOtherKey of array-key * @template TOtherValue * * @param iterable<TOtherKey, TOtherValue> ...$iterables * @return self<TKey|TOtherKey, TValue|TOtherValue> */ function merge(iterable ...$iterables): self; } /** * @param Map<string, int> $map * @psalm-suppress UnusedVariable */ function example(Map $map, int $int, bool $bool): void { /** @psalm-trace $a */ $a = $map->merge([$int => $bool]); /** @psalm-trace $b */ $b = $map->merge([$int => $bool], ['test' => new stdClass()]); }
Issues
Types
idle
Saved Apr 13 2024 15:32 UTC
⌘/Ctrl+Enter
run
⌘/Ctrl+S
share
F8
/
⇧F8
next/prev issue