On Mon, 6 Jun 2011, Matthew Weier O'Phinney wrote: > The point, though, is that with such a typehint available, we can > reduce boilerplate code like the following: > > public function addCallback($callback) > { > if (!is_callback($callback)) { > throw new InvalidArgumentException(); > } > > The typehint makes this simpler: > > public function addCallback(callback $callback) > > which allows us to rely on PHP's native error handling. I, for one, > would love to see this.
That's the same reason why I wanted scalar type hints.... cheers, Derick -- http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php