Re: Callable typehint

From: Date: Mon, 06 Jun 2011 20:48:59 +0000
Subject: Re: Callable typehint
References: 1 2  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Mon, Jun 6, 2011 at 22:35, Stas Malyshev <[email protected]> wrote:
> Hi!
>
>> See attached patch+phpt; Any objections to include it in 5.4?
>
> Yes, same objections as for other static typing.
>

That was totally not the purpose of this, and I don't quite understand
how you made the connection.

Like I mentioned in the other thread (which I probably should had
repeated here), a lot of libs/frameworks are using the 'Closure'
typehint for callbacks.
The problem with that is a function name as a string and
array("classname", "functionname") are considered is_callable().
To get through the intentions of the Closure hint, I would have to
wrap the actual callback in a closure - which doesn't make any sense.

-Hannes


Thread (63 messages)

« previous php.internals (#53079) next »