Hello, On Mon, Jun 6, 2011 at 3:51 PM, Chris Stockton <chrisstockto...@gmail.com> wrote: > Hello, > > On Mon, Jun 6, 2011 at 12:41 PM, Hannes Magnusson > <hannes.magnus...@gmail.com> wrote: >> Hi >> >> As quickly mentioned in the '$arr = array('Hello', 'world'); $arr();' >> thread[1], we are hitting the need for a callable typehint. >> > > This brings a clear and concise enhancement to PHP which I would > benefit from .I have been watching our API provide more and more > functions with callbacks as arguments and it would be nice to have a > specific type for those to clean up the is_callable error handling. > > It is my opinion that comparing it to previous type hinting proposals > is like comparing apples and oranges. I think it falls in align > justification wise between Class Name and Array type hints. > > I.E. > function test1(StdClass $p) .. > function test2(Closure $p) ... <== doesn't this seem more justified > then "Array" given the argument of previous type hinting proposals? > function test3(Array $arr) > > +1 from me > > -Chris >
s/Closure/Callable/g -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php