Hi,

On Wed, 2011-06-08 at 12:04 +0200, Johannes Schlüter wrote:
> 
> Having the behavior cleared I wonder how useful it is in practical
> terms. A class type hint guarantees me I can do a specific call to
> methods defined in the class/interface. The proposed type hint tells
> me
> I can call it in some way. It won't ensure that the signature is
> compatible with what I expect.
> 
>     function foo(callable $cb) {
>         $cb();
>     }
>     foo("strpos"); // This one in fact is illegal but won't be
> prevented
> 
> But maybe this doesn't matter as type hints purely serve documentation
> (as E_RECOVERABLE are useless unless we make them Exceptions ...)
> while
> even for documentation purpose more information is needed.

Any comments to this? - I didn't see an answer before the votes were
opened.

johannes



-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to