Re: Callable type

From: Date: Wed, 08 Jun 2011 05:25:10 +0000
Subject: Re: Callable type
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
2011/6/8 David Zülke <[email protected]>:
> On 08.06.2011, at 00:38, dukeofgaming wrote:
>
>> On Tue, Jun 7, 2011 at 4:41 PM, Matthew Weier O'Phinney <
>> [email protected]> wrote:
>>
>>> On 2011-06-07, dukeofgaming <[email protected]> wrote:
>>>
>>>> +1 for "callable", it is really more consistent.
>>>
>>> I was actually agreeing With David and Stas that "callback" was more
>>> consistent, and casting my vote for that.
>>
>> Oh. But then, shouldn't is_callable be deprecated  for a more consistently
>> named is_callback?
>
> No, because is_callable() also performs visibility checks.
>
> Which of course begs the question... should the type hint do the same?
>
> David
>
>

+1 to "callback" (and have mercy on docs/translation people, it's too
much work to search/replace for such a minor difference :))
And yes, two similar terms (callback/callable) will make situation worse.

Plus to Johanness question: will it add runtime performance overhead
on code like this:

function(callback $callback = 'non_existent_function') {}


-- 
Regards,
Shein Alexey


Thread (63 messages)

« previous php.internals (#53193) next »