On Fri, 5 Apr 2019 at 13:15, Rowan Collins <rowan.coll...@gmail.com> wrote: > > On Fri, 5 Apr 2019 at 12:42, Robert Hickman <robehick...@gmail.com> wrote: >> >> In the first case: >> >> function foo(callable $bar): int { return $bar(); } >> >> I think the value of $bar would have to fall into a set of values >> known to the programmer, or at least known at some level. > > > > I think you're misunderstanding the problem: it's not that the *programmer* > doesn't know the types, it's that the *analysis tool* doesn't know them, > because the programmer hasn't told it, and currently has no way to tell it. >
If the static analyser was programmable, it would be possible to provide it such information, within the scope of a single code base. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php