callable parameter type as string #4349
-
The function map entry for PHP's
I have an exception handler function called
But PHPStan flags the code with
The PHP docs for callables say "A PHP function is passed by its name as a string.," so I would expect any string to be valid, but bonus points for confirming that the string corresponds to a known function name. (There seems to be some debate as to whether or not "ClassName::staticMethod" should work as a string reference rather than How is PHPStan handling the validation of "callable" types? Is it correct to be flagging this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Can you reproduce the problem on phpstan.org? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
dt_error()
ordt_exception()
normally?