<?php /** @param callable(int): void $callable */ function example($callable): never { exit; } example(function ($placeholder) { \PHPStan\dumpType($placeholder); // type: int });
https://phpstan.org/r/72d138ee-4073-4020-a89a-fdbc4466b9de https://phpstan.org/writing-php-code/phpdoc-types#callables
ging-dev Thank you for the suggestion! Adding it into our to-do list.