@param-immediately-invoked-callable
The @param-immediately-invoked-callable tag marks a callable argument that is guaranteed to be called before the function or method returns, and is never stored away for later. That guarantee matters to static analysis: a variable captured by reference into the callback can be trusted to reflect its post-call value as soon as the outer call returns, and a function that only ever invokes such a callback synchronously is easier to reason about as pure or side-effect-free. Without this tag, an analyzer has to assume the callable might be kept and invoked at some unrelated point in time.
Parsing a @param-immediately-invoked-callable tag produces a VariableTag instance exposing $variable: the parameter's name, without the leading $. The type of the callable itself is whatever the parameter's own @param already declares.
The opposite case — a callable stored and invoked only after the call has returned — is documented with @param-later-invoked-callable instead.
PHPStan documents @param-immediately-invoked-callable alongside its other callable-related tags; Psalm has no equivalent.