Martin Scotta
On Wed, Jun 8, 2011 at 5:47 AM, Alexey Shein <[email protected]> wrote:
> 2011/6/8 Hannes Magnusson <[email protected]>:
> > We have the situation in the docs that parameters declared as arrays
> > do not follow the typehinting rules, but parameters as class names do.
> > Re-using the callback from the docs could get confusing when
> > extensions start to typehint on it, but not the core..
> >
> > I think there is a subtle difference between a callback, and a callable.
> > In javascript for example, callback is something that is executed on
> > certain events "onsuccess" is the typical example.
> > There is nothing that says the callable parameter gets executed as a
> > part of an event, and I think the default usecase would be to execute
> > it right away (f.e. filtering data).
> >
> > I think I would prefer callable, but I could live with either.
> >
>
> Wikipedia defines callback as "a reference to executable code, or a
> piece of executable code, that is passed as an argument to other
> code". So there's no "event" meaning put by default, it's just very
> often seen callback's usage in javascript.
> I just like "callback" term more :)
>
so 'strpos' is not a reference nor a piece of executable code, it's just the
name of a function, which is callable, although we can argue if the function
name could be seen as a reference to the code
>
>
> --
> Regards,
> Shein Alexey
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>